<Window x:Class="Tornado3_2026Election.MainWindow"
        x:Name="RootWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="using:Tornado3_2026Election.Controls"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:domain="using:Tornado3_2026Election.Domain"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:vm="using:Tornado3_2026Election.ViewModels"
        mc:Ignorable="d"
        Title="Tornado3 선거방송 상황실">
    <Window.SystemBackdrop>
        <MicaBackdrop />
    </Window.SystemBackdrop>

    <NavigationView x:Name="MainNavigationView"
                    AlwaysShowHeader="False"
                    Background="{StaticResource ControlRoomChromeBrush}"
                    IsBackButtonVisible="Collapsed"
                    IsSettingsVisible="False"
                    PaneDisplayMode="Left"
                    RequestedTheme="Dark"
                    SelectionChanged="MainNavigationView_SelectionChanged">
        <NavigationView.PaneHeader>
            <Border Margin="12,14,12,6"
                    Padding="16"
                    Background="#101A2A"
                    BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                    BorderThickness="1"
                    CornerRadius="20">
                <StackPanel Spacing="10">
                    <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="선택 방송사" />
                    <Image Height="38"
                           HorizontalAlignment="Left"
                           MaxWidth="170"
                           Source="{x:Bind ViewModel.SelectedStationLogo, Mode=OneWay}"
                           Stretch="Uniform"
                           Visibility="{x:Bind ViewModel.SelectedStationLogoVisibility, Mode=OneWay}" />
                    <TextBlock FontFamily="Bahnschrift SemiBold"
                               FontSize="16"
                               Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                               Text="{x:Bind ViewModel.Settings.SelectedStation.Name, Mode=OneWay}" />
                </StackPanel>
            </Border>
        </NavigationView.PaneHeader>
        <NavigationView.MenuItems>
            <NavigationViewItem Content="노멀" Tag="normal" Visibility="{x:Bind ViewModel.NormalMenuVisibility, Mode=OneWay}"><NavigationViewItem.Icon><SymbolIcon Foreground="{x:Bind ViewModel.NormalChannel.PlaybackIconBrush, Mode=OneWay}" Symbol="Play" /></NavigationViewItem.Icon></NavigationViewItem>
            <NavigationViewItem Content="좌상단" Tag="top-left" Visibility="{x:Bind ViewModel.TopLeftMenuVisibility, Mode=OneWay}"><NavigationViewItem.Icon><SymbolIcon Foreground="{x:Bind ViewModel.TopLeftChannel.PlaybackIconBrush, Mode=OneWay}" Symbol="PreviewLink" /></NavigationViewItem.Icon></NavigationViewItem>
            <NavigationViewItem Content="하단" Tag="bottom" Visibility="{x:Bind ViewModel.BottomMenuVisibility, Mode=OneWay}"><NavigationViewItem.Icon><SymbolIcon Foreground="{x:Bind ViewModel.BottomChannel.PlaybackIconBrush, Mode=OneWay}" Symbol="Download" /></NavigationViewItem.Icon></NavigationViewItem>
            <NavigationViewItem Content="비디오월" Tag="videowall" Visibility="{x:Bind ViewModel.VideoWallMenuVisibility, Mode=OneWay}"><NavigationViewItem.Icon><SymbolIcon Foreground="{x:Bind ViewModel.VideoWallChannel.PlaybackIconBrush, Mode=OneWay}" Symbol="Video" /></NavigationViewItem.Icon></NavigationViewItem>
            <NavigationViewItem Content="사전데이터" Tag="pre-election-data"><NavigationViewItem.Icon><SymbolIcon Symbol="Library" /></NavigationViewItem.Icon></NavigationViewItem>
            <NavigationViewItem Content="공약데이터" Tag="career-promises"><NavigationViewItem.Icon><SymbolIcon Symbol="Contact" /></NavigationViewItem.Icon></NavigationViewItem>
            <NavigationViewItem Content="투표데이터" Tag="turnout-data"><NavigationViewItem.Icon><PathIcon Foreground="{x:Bind ViewModel.DataNavigationIconBrush, Mode=OneWay}" Data="M4,2 H13 V3 H4 Z M4,2 H5 V22 H4 Z M4,21 H18 V22 H4 Z M17,7 H18 V22 H17 Z M13,2 L18,7 H13 Z M6,8 H8 V10 H6 Z M10,8 H15 V9 H10 Z M6,12 H8 V14 H6 Z M10,12 H15 V13 H10 Z M6,16 H8 V18 H6 Z M10,16 H14 V17 H10 Z" /></NavigationViewItem.Icon></NavigationViewItem>
            <NavigationViewItem Content="개표데이터" Tag="counting-data"><NavigationViewItem.Icon><PathIcon Foreground="{x:Bind ViewModel.DataNavigationIconBrush, Mode=OneWay}" Data="M10,2 H15 V8 H10 Z M11,4 H14 V5 H11 Z M4,9 H20 V11 H4 Z M6,7 L10,5 L11,6 L7,8 Z M18,7 L14,5 L13,6 L17,8 Z M5,12 H19 L17,21 H7 Z M7,14 L8,19 H16 L17,14 Z" /></NavigationViewItem.Icon></NavigationViewItem>
            <NavigationViewItem Content="컷리스트" Tag="cut-list"><NavigationViewItem.Icon><SymbolIcon Symbol="Bullets" /></NavigationViewItem.Icon></NavigationViewItem>
            <NavigationViewItem Content="설정" Tag="settings"><NavigationViewItem.Icon><SymbolIcon Symbol="Setting" /></NavigationViewItem.Icon></NavigationViewItem>
            <NavigationViewItem Content="로그" Tag="log"><NavigationViewItem.Icon><SymbolIcon Symbol="Document" /></NavigationViewItem.Icon></NavigationViewItem>
        </NavigationView.MenuItems>

        <Grid Padding="28">
            <Grid.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                    <GradientStop Color="#08111F" Offset="0" />
                    <GradientStop Color="#0D182A" Offset="0.5" />
                    <GradientStop Color="#12131E" Offset="1" />
                </LinearGradientBrush>
            </Grid.Background>

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Border Padding="14"
                    Background="{StaticResource ControlRoomHeroBrush}"
                    BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                    BorderThickness="1"
                    CornerRadius="24">
                <StackPanel Spacing="10">
                    <Grid ColumnSpacing="12">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <StackPanel Spacing="4">
                            <TextBlock Style="{StaticResource ConsoleHeroTitleTextStyle}"
                                       FontSize="25"
                                       Text="선거방송 송출 상황실" />
                            <TextBlock Style="{StaticResource ConsoleBodyTextStyle}"
                                       Text="{x:Bind ViewModel.HeaderStatus, Mode=OneWay}"
                                       TextTrimming="CharacterEllipsis" />
                        </StackPanel>

                        <StackPanel Grid.Column="1"
                                    Orientation="Horizontal"
                                    Spacing="10"
                                    VerticalAlignment="Top">
                            <TextBlock FontFamily="Consolas"
                                       Foreground="{StaticResource ControlRoomSignalBlueBrush}"
                                       Text="{x:Bind ViewModel.Data.PollingCountdownText, Mode=OneWay}"
                                       VerticalAlignment="Center" />
                            <StackPanel Spacing="2">
                                <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="단계" HorizontalAlignment="Center" />
                                <ToggleSwitch x:Name="BroadcastPhaseToggleSwitch"
                                              OffContent="투표"
                                              OnContent="개표"
                                              IsOn="{x:Bind ViewModel.Data.IsCountingPhase, Mode=OneWay}"
                                              Toggled="BroadcastPhaseToggleSwitch_Toggled" />
                            </StackPanel>
                            <StackPanel Spacing="2">
                                <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="모드" HorizontalAlignment="Center" />
                                <ToggleSwitch x:Name="OperationModeToggleSwitch"
                                              OffContent="일반"
                                              OnContent="비디오월"
                                              IsOn="{x:Bind ViewModel.IsVideoWallOperationMode, Mode=OneWay}"
                                              Toggled="OperationModeToggleSwitch_Toggled" />
                            </StackPanel>
                            <Button Command="{x:Bind ViewModel.Data.ManualRefreshCommand}"
                                    Content="수동 갱신"
                                    Style="{StaticResource ConsoleGhostButtonStyle}" />
                            <Button Command="{x:Bind ViewModel.ToggleSituationRoomCommand}"
                                    Content="{x:Bind ViewModel.SituationRoomToggleText, Mode=OneWay}"
                                    Style="{StaticResource ConsoleGhostButtonStyle}" />
                        </StackPanel>
                    </Grid>

                    <Grid ColumnSpacing="10">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <Border Padding="10,8" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="14">
                            <StackPanel Spacing="2">
                                <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="메뉴 / 방송사" />
                                <TextBlock FontFamily="Bahnschrift SemiBold"
                                           FontSize="15"
                                           Foreground="{StaticResource ControlRoomSignalBlueBrush}"
                                           TextTrimming="CharacterEllipsis">
                                    <Run Text="{x:Bind ViewModel.CurrentPageTitle, Mode=OneWay}" />
                                    <Run Text=" / " />
                                    <Run Text="{x:Bind ViewModel.Settings.SelectedStation.Name, Mode=OneWay}" />
                                </TextBlock>
                            </StackPanel>
                        </Border>

                        <Border Grid.Column="1" Padding="10,8" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="14">
                            <StackPanel Spacing="2">
                                <StackPanel Orientation="Horizontal" Spacing="6">
                                    <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="CG 연결 상태" />
                                    <Button Width="22"
                                            Height="22"
                                            MinWidth="22"
                                            MinHeight="22"
                                            Padding="0"
                                            VerticalAlignment="Center"
                                            Content="?"
                                            FontFamily="Bahnschrift SemiBold"
                                            FontSize="11">
                                        <Button.Flyout>
                                            <Flyout>
                                                <TextBlock MaxWidth="260"
                                                           Text="Karisma TCP 30001 연결 상태입니다. 녹색은 실제 연결 성공, 빨간색은 끊김 상태입니다."
                                                           TextWrapping="WrapWholeWords" />
                                            </Flyout>
                                        </Button.Flyout>
                                    </Button>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Spacing="8">
                                    <Ellipse Width="10"
                                             Height="10"
                                             VerticalAlignment="Center"
                                             Fill="{x:Bind ViewModel.CgIntegrationBrush, Mode=OneWay}" />
                                    <TextBlock FontFamily="Bahnschrift SemiBold"
                                               FontSize="15"
                                               Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                               Text="{x:Bind ViewModel.CgIntegrationSummary, Mode=OneWay}" />
                                </StackPanel>
                                <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                           Text="{x:Bind ViewModel.CgIntegrationDetail, Mode=OneWay}"
                                           TextTrimming="CharacterEllipsis" />
                            </StackPanel>
                        </Border>
                    </Grid>

                    <Border Visibility="{x:Bind ViewModel.SituationRoomBodyVisibility, Mode=OneWay}"
                            Padding="10,8"
                            Background="#101C2E"
                            BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                            BorderThickness="1"
                            CornerRadius="16">
                        <StackPanel Spacing="4">
                            <TextBlock FontFamily="Consolas"
                                       Foreground="{StaticResource ControlRoomTextSecondaryBrush}"
                                       Text="{x:Bind ViewModel.HeaderStatus, Mode=OneWay}"
                                       TextTrimming="CharacterEllipsis" />
                            <TextBlock Style="{StaticResource ConsoleBodyTextStyle}"
                                       Text="{x:Bind ViewModel.TornadoConnectionDetail, Mode=OneWay}"
                                       TextTrimming="CharacterEllipsis" />
                        </StackPanel>
                    </Border>
                </StackPanel>
            </Border>

            <Grid Grid.Row="1">
                <ScrollViewer Visibility="{x:Bind ViewModel.IntegratedScheduleVisibility, Mode=OneWay}">
                    <StackPanel Spacing="20">
                        <Grid ColumnSpacing="20">
                            <Grid.ColumnDefinitions><ColumnDefinition Width="2*" /><ColumnDefinition Width="1*" /></Grid.ColumnDefinitions>
                            <Border Padding="20" Background="{StaticResource ControlRoomPanelGradientBrush}" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="24">
                                <Grid>
                                    <StackPanel Spacing="10" Visibility="{x:Bind ViewModel.GeneralIntegratedVisibility, Mode=OneWay}">
                                        <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="통합 채널" />
                                        <Grid ColumnSpacing="10">
                                            <Grid.ColumnDefinitions><ColumnDefinition Width="*" /><ColumnDefinition Width="*" /><ColumnDefinition Width="*" /></Grid.ColumnDefinitions>
                                            <Border Padding="14" Background="#16263A" BorderBrush="#284665" BorderThickness="1" CornerRadius="18"><StackPanel Spacing="4"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="노멀" /><TextBlock Style="{StaticResource ConsoleBodyTextStyle}" Text="{x:Bind ViewModel.NormalChannel.TransmissionLabel, Mode=OneWay}" /><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="{x:Bind ViewModel.NormalChannel.CurrentItemName, Mode=OneWay}" /></StackPanel></Border>
                                            <Border Grid.Column="1" Padding="14" Background="#16263A" BorderBrush="#284665" BorderThickness="1" CornerRadius="18"><StackPanel Spacing="4"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="좌상단" /><TextBlock Style="{StaticResource ConsoleBodyTextStyle}" Text="{x:Bind ViewModel.TopLeftChannel.TransmissionLabel, Mode=OneWay}" /><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="{x:Bind ViewModel.TopLeftChannel.CurrentItemName, Mode=OneWay}" /></StackPanel></Border>
                                            <Border Grid.Column="2" Padding="14" Background="#16263A" BorderBrush="#284665" BorderThickness="1" CornerRadius="18"><StackPanel Spacing="4"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="하단" /><TextBlock Style="{StaticResource ConsoleBodyTextStyle}" Text="{x:Bind ViewModel.BottomChannel.TransmissionLabel, Mode=OneWay}" /><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="{x:Bind ViewModel.BottomChannel.CurrentItemName, Mode=OneWay}" /></StackPanel></Border>
                                        </Grid>
                                    </StackPanel>
                                    <StackPanel Spacing="10" Visibility="{x:Bind ViewModel.VideoWallIntegratedVisibility, Mode=OneWay}">
                                        <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="비디오월 채널" />
                                        <Border Padding="14" Background="#16263A" BorderBrush="#284665" BorderThickness="1" CornerRadius="18"><StackPanel Spacing="4"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="비디오월" /><TextBlock Style="{StaticResource ConsoleBodyTextStyle}" Text="{x:Bind ViewModel.VideoWallChannel.TransmissionLabel, Mode=OneWay}" /><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="{x:Bind ViewModel.VideoWallChannel.CurrentItemName, Mode=OneWay}" /></StackPanel></Border>
                                    </StackPanel>
                                </Grid>
                            </Border>
                            <StackPanel Grid.Column="1" Spacing="20">
                                <Border Padding="18" Background="{StaticResource ControlRoomPanelGradientBrush}" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="24">
                                    <StackPanel Spacing="12">
                                        <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="저장 / 복원" />
                                        <StackPanel Orientation="Horizontal" Spacing="10">
                                            <Button Command="{x:Bind ViewModel.SaveStateCommand}" Content="상태 저장" Style="{StaticResource ConsolePrimaryButtonStyle}" />
                                            <Button Command="{x:Bind ViewModel.RestoreStateCommand}" Content="복원" Style="{StaticResource ConsoleGhostButtonStyle}" />
                                        </StackPanel>
                                    </StackPanel>
                                </Border>
                            </StackPanel>
                        </Grid>

                        <Grid Visibility="{x:Bind ViewModel.GeneralIntegratedVisibility, Mode=OneWay}" ColumnSpacing="20" RowSpacing="20">
                            <Grid.RowDefinitions><RowDefinition Height="Auto" /><RowDefinition Height="Auto" /></Grid.RowDefinitions>
                            <Grid.ColumnDefinitions><ColumnDefinition Width="*" /><ColumnDefinition Width="*" /></Grid.ColumnDefinitions>
                            <controls:ChannelSchedulePanel ViewModel="{x:Bind ViewModel.NormalChannel, Mode=OneWay}" />
                            <controls:ChannelSchedulePanel Grid.Column="1" ViewModel="{x:Bind ViewModel.TopLeftChannel, Mode=OneWay}" />
                            <controls:ChannelSchedulePanel Grid.Row="1" Grid.ColumnSpan="2" ViewModel="{x:Bind ViewModel.BottomChannel, Mode=OneWay}" />
                        </Grid>
                        <controls:ChannelSchedulePanel Visibility="{x:Bind ViewModel.VideoWallIntegratedVisibility, Mode=OneWay}" ViewModel="{x:Bind ViewModel.VideoWallChannel, Mode=OneWay}" />
                    </StackPanel>
                </ScrollViewer>

                <ScrollViewer Visibility="{x:Bind ViewModel.NormalVisibility, Mode=OneWay}"><controls:ChannelSchedulePanel ViewModel="{x:Bind ViewModel.NormalChannel, Mode=OneWay}" /></ScrollViewer>
                <ScrollViewer Visibility="{x:Bind ViewModel.TopLeftVisibility, Mode=OneWay}"><controls:ChannelSchedulePanel ViewModel="{x:Bind ViewModel.TopLeftChannel, Mode=OneWay}" /></ScrollViewer>
                <ScrollViewer Visibility="{x:Bind ViewModel.BottomVisibility, Mode=OneWay}"><controls:ChannelSchedulePanel ViewModel="{x:Bind ViewModel.BottomChannel, Mode=OneWay}" /></ScrollViewer>
                <ScrollViewer Visibility="{x:Bind ViewModel.VideoWallVisibility, Mode=OneWay}"><controls:ChannelSchedulePanel ViewModel="{x:Bind ViewModel.VideoWallChannel, Mode=OneWay}" /></ScrollViewer>

                <ScrollViewer Visibility="{x:Bind ViewModel.PreElectionDataVisibility, Mode=OneWay}">
                    <StackPanel Spacing="20">
                        <Border Padding="20" Background="{StaticResource ControlRoomPanelGradientBrush}" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="24">
                            <StackPanel Spacing="16">
                                <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="사전데이터" />
                                <Grid ColumnSpacing="12" RowSpacing="12">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="220" />
                                        <ColumnDefinition Width="300" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <ComboBox Header="선거 종류"
                                              DisplayMemberPath="Label"
                                              ItemsSource="{x:Bind ViewModel.Data.PreElectionHistoryElectionTypeOptions, Mode=OneWay}"
                                              SelectedValue="{x:Bind ViewModel.Data.PreElectionHistoryElectionType, Mode=TwoWay}"
                                              SelectedValuePath="Value" />
                                    <ComboBox Grid.Column="1"
                                              Header="선거구명"
                                              DisplayMemberPath="Label"
                                              ItemsSource="{x:Bind ViewModel.Data.PreElectionHistoryDistrictOptions, Mode=OneWay}"
                                              SelectedValue="{x:Bind ViewModel.Data.PreElectionHistoryDistrictName, Mode=TwoWay}"
                                              SelectedValuePath="Value" />
                                    <TextBlock Grid.Column="2"
                                               VerticalAlignment="Bottom"
                                               Style="{StaticResource ConsoleBodyTextStyle}"
                                               Text="{x:Bind ViewModel.Data.PreElectionHistorySummaryText, Mode=OneWay}"
                                               TextWrapping="Wrap" />
                                </Grid>
                                <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                           Text="{x:Bind ViewModel.Data.PreElectionHistoryCoverageText, Mode=OneWay}"
                                           TextWrapping="Wrap" />
                            </StackPanel>
                        </Border>

                        <Border Padding="20"
                                Background="{StaticResource ControlRoomPanelGradientBrush}"
                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                BorderThickness="1"
                                CornerRadius="24"
                                Visibility="{x:Bind ViewModel.Data.PreElectionHistoryVisibility, Mode=OneWay}">
                            <StackPanel Spacing="14">
                                <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}"
                                           Text="{x:Bind ViewModel.Data.PreElectionHistoryTitle, Mode=OneWay}" />
                                <TextBlock Style="{StaticResource ConsoleBodyTextStyle}"
                                           Text="{x:Bind ViewModel.Data.PreElectionHistoryStatusText, Mode=OneWay}"
                                           TextWrapping="Wrap" />
                                <Grid ColumnSpacing="12">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock VerticalAlignment="Center"
                                               Style="{StaticResource ConsoleLabelTextStyle}"
                                               Text="{x:Bind ViewModel.Data.PreElectionHistoryEditorStatusText, Mode=OneWay}"
                                               TextWrapping="Wrap" />
                                    <Button Grid.Column="1"
                                            Command="{x:Bind ViewModel.Data.SavePreElectionHistoryCommand}"
                                            Content="사전데이터 저장"
                                            Style="{StaticResource ConsoleGhostButtonStyle}" />
                                </Grid>
                                <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                           Text="{x:Bind ViewModel.Data.PreElectionHistorySaveStateText, Mode=OneWay}"
                                           TextWrapping="Wrap" />

                                <StackPanel Spacing="10">
                                    <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="역대 투표율 시트" />
                                    <ScrollViewer HorizontalScrollBarVisibility="Auto"
                                                  HorizontalScrollMode="Enabled"
                                                  VerticalScrollBarVisibility="Disabled"
                                                  VerticalScrollMode="Disabled">
                                        <StackPanel Spacing="0">
                                            <Grid MinWidth="700">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="90" />
                                                    <ColumnDefinition Width="110" />
                                                    <ColumnDefinition Width="170" />
                                                    <ColumnDefinition Width="170" />
                                                    <ColumnDefinition Width="120" />
                                                </Grid.ColumnDefinitions>
                                                <Border Grid.Column="0" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="회차" /></Border>
                                                <Border Grid.Column="1" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="연도" /></Border>
                                                <Border Grid.Column="2" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="선거인" /></Border>
                                                <Border Grid.Column="3" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="투표자" /></Border>
                                                <Border Grid.Column="4" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="투표율" /></Border>
                                            </Grid>

                                            <ItemsControl ItemsSource="{x:Bind ViewModel.Data.PreElectionHistoryEditableTurnoutRows, Mode=OneWay}">
                                                <ItemsControl.ItemTemplate>
                                                    <DataTemplate x:DataType="vm:PreElectionHistoryTurnoutEditRowViewModel">
                                                        <Grid MinWidth="700">
                                                            <Grid.ColumnDefinitions>
                                                                <ColumnDefinition Width="90" />
                                                                <ColumnDefinition Width="110" />
                                                                <ColumnDefinition Width="170" />
                                                                <ColumnDefinition Width="170" />
                                                                <ColumnDefinition Width="120" />
                                                            </Grid.ColumnDefinitions>
                                                            <Border Grid.Column="0" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind ElectionOrder}" TextAlignment="Center" /></Border>
                                                            <Border Grid.Column="1" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind Year}" TextAlignment="Center" /></Border>
                                                            <Border Grid.Column="2" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBox BorderThickness="0" Background="Transparent" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" HorizontalContentAlignment="Right" Text="{x:Bind ElectorsText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /></Border>
                                                            <Border Grid.Column="3" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBox BorderThickness="0" Background="Transparent" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" HorizontalContentAlignment="Right" Text="{x:Bind VotesText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /></Border>
                                                            <Border Grid.Column="4" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock FontFamily="Consolas" Foreground="{StaticResource ControlRoomSignalBlueBrush}" Text="{x:Bind TurnoutRateDisplay}" TextAlignment="Right" /></Border>
                                                        </Grid>
                                                    </DataTemplate>
                                                </ItemsControl.ItemTemplate>
                                            </ItemsControl>
                                        </StackPanel>
                                    </ScrollViewer>
                                </StackPanel>

                                <StackPanel Spacing="10">
                                    <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="역대 당선자 시트" />
                                    <ScrollViewer HorizontalScrollBarVisibility="Auto"
                                                  HorizontalScrollMode="Enabled"
                                                  VerticalScrollBarVisibility="Disabled"
                                                  VerticalScrollMode="Disabled">
                                        <StackPanel Spacing="0">
                                            <Grid MinWidth="1160">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="90" />
                                                    <ColumnDefinition Width="110" />
                                                    <ColumnDefinition Width="150" />
                                                    <ColumnDefinition Width="180" />
                                                    <ColumnDefinition Width="300" />
                                                    <ColumnDefinition Width="330" />
                                                </Grid.ColumnDefinitions>
                                                <Border Grid.Column="0" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="회차" /></Border>
                                                <Border Grid.Column="1" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="연도" /></Border>
                                                <Border Grid.Column="2" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="이름" /></Border>
                                                <Border Grid.Column="3" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="표기 정당" /></Border>
                                                <Border Grid.Column="4" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="색상 포맷" /></Border>
                                                <Border Grid.Column="5" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="비고" /></Border>
                                            </Grid>

                                            <ItemsControl ItemsSource="{x:Bind ViewModel.Data.PreElectionHistoryEditableWinnerRows, Mode=OneWay}">
                                                <ItemsControl.ItemTemplate>
                                                    <DataTemplate x:DataType="vm:PreElectionHistoryWinnerEditRowViewModel">
                                                        <Grid MinWidth="1160">
                                                            <Grid.ColumnDefinitions>
                                                                <ColumnDefinition Width="90" />
                                                                <ColumnDefinition Width="110" />
                                                                <ColumnDefinition Width="150" />
                                                                <ColumnDefinition Width="180" />
                                                                <ColumnDefinition Width="300" />
                                                                <ColumnDefinition Width="330" />
                                                            </Grid.ColumnDefinitions>
                                                            <Border Grid.Column="0" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind ElectionOrder}" TextAlignment="Center" /></Border>
                                                            <Border Grid.Column="1" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind Year}" TextAlignment="Center" /></Border>
                                                            <Border Grid.Column="2" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBox BorderThickness="0" Background="Transparent" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /></Border>
                                                            <Border Grid.Column="3" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBox BorderThickness="0" Background="Transparent" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind Party, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /></Border>
                                                            <Border Grid.Column="4" Padding="6,4" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1">
                                                                <Grid ColumnSpacing="10">
                                                                    <Grid.ColumnDefinitions>
                                                                        <ColumnDefinition Width="150" />
                                                                        <ColumnDefinition Width="*" />
                                                                    </Grid.ColumnDefinitions>
                                                                    <ComboBox DisplayMemberPath="Label"
                                                                              ItemsSource="{x:Bind ColorPartyOptions, Mode=OneWay}"
                                                                              SelectedValue="{x:Bind ColorParty, Mode=TwoWay}"
                                                                              SelectedValuePath="Value" />
                                                                    <StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="8" VerticalAlignment="Center">
                                                                        <Border Width="72"
                                                                                Height="20"
                                                                                BorderBrush="{x:Bind ColorPartyPreviewOutlineBrush, Mode=OneWay}"
                                                                                BorderThickness="1"
                                                                                CornerRadius="4">
                                                                            <Grid>
                                                                                <Grid.ColumnDefinitions>
                                                                                    <ColumnDefinition Width="22" />
                                                                                    <ColumnDefinition Width="*" />
                                                                                    <ColumnDefinition Width="24" />
                                                                                </Grid.ColumnDefinitions>
                                                                                <Rectangle Grid.Column="0" Fill="{x:Bind ColorPartyPreviewAccentBrush, Mode=OneWay}" />
                                                                                <Rectangle Grid.Column="1" Fill="{x:Bind ColorPartyPreviewBaseBrush, Mode=OneWay}" />
                                                                                <Rectangle Grid.Column="2" Fill="{x:Bind ColorPartyPreviewSecondaryBrush, Mode=OneWay}" />
                                                                            </Grid>
                                                                        </Border>
                                                                        <TextBlock Foreground="{StaticResource ControlRoomTextSecondaryBrush}"
                                                                                   MaxLines="2"
                                                                                   Text="{x:Bind ColorPartyPreviewSummary, Mode=OneWay}"
                                                                                   TextWrapping="WrapWholeWords" />
                                                                    </StackPanel>
                                                                </Grid>
                                                            </Border>
                                                            <Border Grid.Column="5" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBox BorderThickness="0" Background="Transparent" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind Note, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /></Border>
                                                        </Grid>
                                                    </DataTemplate>
                                                </ItemsControl.ItemTemplate>
                                            </ItemsControl>
                                        </StackPanel>
                                    </ScrollViewer>
                                </StackPanel>
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </ScrollViewer>

                <ScrollViewer Visibility="{x:Bind ViewModel.DataVisibility, Mode=OneWay}">
                    <StackPanel Spacing="20">
                        <Border Padding="20" Background="{StaticResource ControlRoomPanelGradientBrush}" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="24">
                            <StackPanel Spacing="16">
                                <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="원본 데이터 조회" />
                                <Grid ColumnSpacing="12" RowSpacing="12">
                                    <Grid.ColumnDefinitions><ColumnDefinition Width="220" /><ColumnDefinition Width="220" /><ColumnDefinition Width="*" /></Grid.ColumnDefinitions>
                                    <ComboBox Header="선거 종류"
                                              DisplayMemberPath="Label"
                                              ItemsSource="{x:Bind ViewModel.Data.ElectionTypeOptions, Mode=OneWay}"
                                              SelectedValue="{x:Bind ViewModel.Data.ElectionType, Mode=TwoWay}"
                                              SelectedValuePath="Value" />
                                    <ComboBox Grid.Column="1"
                                              Header="선거구명"
                                              DisplayMemberPath="Label"
                                              ItemsSource="{x:Bind ViewModel.Data.DistrictViewOptions, Mode=OneWay}"
                                              SelectedValue="{x:Bind ViewModel.Data.SelectedDistrictViewName, Mode=TwoWay}"
                                              SelectedValuePath="Value" />
                                    <StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="10" VerticalAlignment="Bottom">
                                        <ToggleSwitch Header="API 자동 갱신" IsOn="{x:Bind ViewModel.Data.IsPollingEnabled, Mode=TwoWay}" />
                                        <StackPanel VerticalAlignment="Bottom" Spacing="2">
                                            <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="갱신 주기" />
                                            <TextBlock Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="60초 고정" />
                                        </StackPanel>
                                        <Button Command="{x:Bind ViewModel.Data.ManualRefreshCommand}" Content="수동 갱신" Style="{StaticResource ConsolePrimaryButtonStyle}" />
                                    </StackPanel>
                                </Grid>
                                <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                           Text="{x:Bind ViewModel.Data.ConfiguredRegionFilterHintText, Mode=OneWay}"
                                           TextWrapping="Wrap" />
                                <TextBlock Style="{StaticResource ConsoleBodyTextStyle}"
                                           Text="{x:Bind ViewModel.Data.StatusText, Mode=OneWay}"
                                           TextWrapping="Wrap" />
                            </StackPanel>
                        </Border>

                        <Border Padding="20"
                                Background="{StaticResource ControlRoomPanelGradientBrush}"
                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                BorderThickness="1"
                                CornerRadius="24">
                            <StackPanel Spacing="14">
                                <Grid ColumnSpacing="12" RowSpacing="12">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="150" />
                                        <ColumnDefinition Width="150" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <StackPanel Spacing="4">
                                        <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="접전 조건" />
                                        <TextBlock Style="{StaticResource ConsoleBodyTextStyle}"
                                                   Text="{x:Bind ViewModel.Data.CloseRaceThresholdSummaryText, Mode=OneWay}"
                                                   TextWrapping="Wrap" />
                                    </StackPanel>
                                    <NumberBox Grid.Column="1"
                                               Header="접전 기준(%)"
                                               Maximum="100"
                                               Minimum="0"
                                               SmallChange="0.1"
                                               SpinButtonPlacementMode="Compact"
                                               Value="{x:Bind ViewModel.Data.DraftCloseRaceThresholdPercent, Mode=TwoWay}" />
                                    <NumberBox Grid.Column="2"
                                               Header="초접전 기준(%)"
                                               Maximum="100"
                                               Minimum="0"
                                               SmallChange="0.1"
                                               SpinButtonPlacementMode="Compact"
                                               Value="{x:Bind ViewModel.Data.DraftSuperCloseRaceThresholdPercent, Mode=TwoWay}" />
                                    <Button Grid.Column="3"
                                            Command="{x:Bind ViewModel.Data.ApplyCloseRaceThresholdsCommand}"
                                            Content="적용"
                                            IsEnabled="{x:Bind ViewModel.Data.HasPendingCloseRaceThresholdChange, Mode=OneWay}"
                                            Style="{StaticResource ConsolePrimaryButtonStyle}"
                                            VerticalAlignment="Bottom" />
                                    <Button Grid.Column="4"
                                            Command="{x:Bind ViewModel.Data.ResetCloseRaceThresholdsCommand}"
                                            Content="기본값"
                                            Style="{StaticResource ConsoleGhostButtonStyle}"
                                            VerticalAlignment="Bottom" />
                                    <Button Grid.Column="5"
                                            Command="{x:Bind ViewModel.Data.RefreshCloseRaceTargetsCommand}"
                                            Content="대상 확인"
                                            Style="{StaticResource ConsoleGhostButtonStyle}"
                                            VerticalAlignment="Bottom" />
                                </Grid>
                                <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                           Text="{x:Bind ViewModel.Data.CloseRaceThresholdStatusText, Mode=OneWay}"
                                           TextWrapping="Wrap" />
                                <TextBlock Style="{StaticResource ConsoleBodyTextStyle}"
                                           Text="{x:Bind ViewModel.Data.CloseRaceTargetSummaryText, Mode=OneWay}"
                                           TextWrapping="Wrap" />
                                <ItemsControl ItemsSource="{x:Bind ViewModel.Data.CloseRaceTargets, Mode=OneWay}"
                                              Visibility="{x:Bind ViewModel.Data.CloseRaceTargetsVisibility, Mode=OneWay}">
                                    <ItemsControl.ItemTemplate>
                                        <DataTemplate x:DataType="vm:CloseRaceTargetViewModel">
                                            <Border Margin="0,0,0,8"
                                                    Padding="12"
                                                    Background="#132338"
                                                    BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                                    BorderThickness="1"
                                                    CornerRadius="8">
                                                <Grid ColumnSpacing="12">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="180" />
                                                        <ColumnDefinition Width="90" />
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="90" />
                                                    </Grid.ColumnDefinitions>
                                                    <StackPanel>
                                                        <TextBlock Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind RegionName}" TextWrapping="Wrap" />
                                                        <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="{x:Bind DistrictName}" TextWrapping="Wrap" />
                                                    </StackPanel>
                                                    <TextBlock Grid.Column="1"
                                                               FontWeight="SemiBold"
                                                               Foreground="{StaticResource ControlRoomSignalBlueBrush}"
                                                               Text="{x:Bind Level}"
                                                               VerticalAlignment="Center" />
                                                    <TextBlock Grid.Column="2"
                                                               Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                               Text="{x:Bind FirstCandidateText}"
                                                               TextWrapping="Wrap"
                                                               VerticalAlignment="Center" />
                                                    <TextBlock Grid.Column="3"
                                                               Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                               Text="{x:Bind SecondCandidateText}"
                                                               TextWrapping="Wrap"
                                                               VerticalAlignment="Center" />
                                                    <StackPanel Grid.Column="4" VerticalAlignment="Center">
                                                        <TextBlock FontFamily="Consolas"
                                                                   Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                                   Text="{x:Bind FirstVoteRateDisplay}" />
                                                        <TextBlock FontFamily="Consolas"
                                                                   Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                                   Text="{x:Bind SecondVoteRateDisplay}" />
                                                        <TextBlock FontFamily="Consolas"
                                                                   Foreground="{StaticResource ControlRoomSignalGreenBrush}"
                                                                   Text="{x:Bind GapDisplay}" />
                                                    </StackPanel>
                                                </Grid>
                                            </Border>
                                        </DataTemplate>
                                    </ItemsControl.ItemTemplate>
                                </ItemsControl>
                            </StackPanel>
                        </Border>

                        <Border Padding="20"
                                Background="{StaticResource ControlRoomPanelGradientBrush}"
                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                BorderThickness="1"
                                CornerRadius="24"
                                Visibility="{x:Bind ViewModel.Data.DistrictOverviewVisibility, Mode=OneWay}">
                            <StackPanel Spacing="14">
                                <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}"
                                           Text="{x:Bind ViewModel.Data.DistrictOverviewTitle, Mode=OneWay}" />
                                <TextBlock Style="{StaticResource ConsoleBodyTextStyle}"
                                           Text="{x:Bind ViewModel.Data.DistrictOverviewStatusText, Mode=OneWay}"
                                           TextWrapping="Wrap" />
                                <ItemsControl ItemsSource="{x:Bind ViewModel.Data.DistrictOverviewCards, Mode=OneWay}">
                                    <ItemsControl.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <ItemsWrapGrid MaximumRowsOrColumns="4"
                                                           Orientation="Horizontal" />
                                        </ItemsPanelTemplate>
                                    </ItemsControl.ItemsPanel>
                                    <ItemsControl.ItemTemplate>
                                        <DataTemplate x:DataType="vm:DistrictOverviewCardViewModel">
                                            <Border MinWidth="180"
                                                    Margin="0,0,12,12"
                                                    Padding="14,12"
                                                    Background="#132338"
                                                    BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                                    BorderThickness="1"
                                                    CornerRadius="8"
                                                    Tapped="DistrictOverviewCard_Tapped">
                                                <StackPanel Spacing="6">
                                                    <TextBlock Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                               Text="{x:Bind RegionName}"
                                                               TextWrapping="Wrap" />
                                                    <TextBlock FontFamily="Consolas"
                                                               FontSize="24"
                                                               Foreground="{StaticResource ControlRoomSignalBlueBrush}"
                                                               Text="{x:Bind CountedRateDisplay}" />
                                                    <Border Padding="8,3"
                                                            HorizontalAlignment="Left"
                                                            Background="#7C2D12"
                                                            BorderBrush="#FDBA74"
                                                            BorderThickness="1"
                                                            CornerRadius="4"
                                                            Visibility="{x:Bind JudgementVisibility}">
                                                        <StackPanel Spacing="2">
                                                            <TextBlock FontSize="12"
                                                                       FontWeight="SemiBold"
                                                                       Foreground="#FED7AA"
                                                                       Text="{x:Bind JudgementBadgeText}"
                                                                       TextWrapping="Wrap" />
                                                            <TextBlock FontSize="11"
                                                                       Foreground="#FFEDD5"
                                                                       Text="{x:Bind JudgementDetailText}"
                                                                       TextWrapping="Wrap" />
                                                        </StackPanel>
                                                    </Border>
                                                    <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                                               Text="{x:Bind DetailText}"
                                                               TextWrapping="Wrap" />
                                                </StackPanel>
                                            </Border>
                                        </DataTemplate>
                                    </ItemsControl.ItemTemplate>
                                </ItemsControl>
                            </StackPanel>
                        </Border>

                        <Border Padding="20"
                                Background="{StaticResource ControlRoomPanelGradientBrush}"
                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                BorderThickness="1"
                                CornerRadius="24"
                                Visibility="{x:Bind ViewModel.Data.TurnoutBoardVisibility, Mode=OneWay}">
                            <StackPanel Spacing="14">
                                <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="투표율 시트" />
                                <ScrollViewer HorizontalScrollBarVisibility="Auto"
                                              HorizontalScrollMode="Enabled"
                                              VerticalScrollBarVisibility="Disabled"
                                              VerticalScrollMode="Disabled">
                                    <StackPanel Spacing="0">
                                        <Grid MinWidth="720">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="180" />
                                                <ColumnDefinition Width="180" />
                                                <ColumnDefinition Width="180" />
                                                <ColumnDefinition Width="180" />
                                            </Grid.ColumnDefinitions>
                                            <Border Grid.Column="0" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="{x:Bind ViewModel.Data.TotalExpectedVotesLabel, Mode=OneWay}" /></Border>
                                            <Border Grid.Column="1" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="투표수" /></Border>
                                            <Border Grid.Column="2" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="미투표수" /></Border>
                                            <Border Grid.Column="3" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="투표율(%)" /></Border>
                                        </Grid>
                                        <Grid MinWidth="720">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="180" />
                                                <ColumnDefinition Width="180" />
                                                <ColumnDefinition Width="180" />
                                                <ColumnDefinition Width="180" />
                                            </Grid.ColumnDefinitions>
                                            <Border Grid.Column="0" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock FontFamily="Consolas" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind ViewModel.Data.TotalExpectedVotes, Mode=OneWay}" /></Border>
                                            <Border Grid.Column="1" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock FontFamily="Consolas" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind ViewModel.Data.TurnoutVotes, Mode=OneWay}" /></Border>
                                            <Border Grid.Column="2" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock FontFamily="Consolas" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind ViewModel.Data.TurnoutRemainingVotes, Mode=OneWay}" /></Border>
                                            <Border Grid.Column="3" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock FontFamily="Consolas" Foreground="{StaticResource ControlRoomSignalGreenBrush}" Text="{x:Bind ViewModel.Data.TurnoutRateDisplay, Mode=OneWay}" /></Border>
                                        </Grid>
                                    </StackPanel>
                                </ScrollViewer>
                            </StackPanel>
                        </Border>

                        <Border Padding="20"
                                Background="{StaticResource ControlRoomPanelGradientBrush}"
                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                BorderThickness="1"
                                CornerRadius="24"
                                Visibility="{x:Bind ViewModel.Data.CandidateBoardVisibility, Mode=OneWay}">
                            <StackPanel Spacing="14">
                                <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="개표율 시트" />
                                <ScrollViewer HorizontalScrollBarVisibility="Auto"
                                              HorizontalScrollMode="Enabled"
                                              VerticalScrollBarVisibility="Disabled"
                                              VerticalScrollMode="Disabled">
                                    <StackPanel Spacing="0">
                                        <Grid MinWidth="720">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="180" />
                                                <ColumnDefinition Width="180" />
                                                <ColumnDefinition Width="180" />
                                                <ColumnDefinition Width="180" />
                                            </Grid.ColumnDefinitions>
                                            <Border Grid.Column="0" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="{x:Bind ViewModel.Data.CountedRateBaseLabel, Mode=OneWay}" /></Border>
                                            <Border Grid.Column="1" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="개표수" /></Border>
                                            <Border Grid.Column="2" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="남은표" /></Border>
                                            <Border Grid.Column="3" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="개표율(%)" /></Border>
                                        </Grid>
                                        <Grid MinWidth="720">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="180" />
                                                <ColumnDefinition Width="180" />
                                                <ColumnDefinition Width="180" />
                                                <ColumnDefinition Width="180" />
                                            </Grid.ColumnDefinitions>
                                            <Border Grid.Column="0" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock FontFamily="Consolas" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind ViewModel.Data.CountedRateBaseVotes, Mode=OneWay}" /></Border>
                                            <Border Grid.Column="1" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock FontFamily="Consolas" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind ViewModel.Data.CountedVotes, Mode=OneWay}" /></Border>
                                            <Border Grid.Column="2" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock FontFamily="Consolas" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind ViewModel.Data.RemainingVotes, Mode=OneWay}" /></Border>
                                            <Border Grid.Column="3" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock FontFamily="Consolas" Foreground="{StaticResource ControlRoomSignalBlueBrush}" Text="{x:Bind ViewModel.Data.CountedRateDisplay, Mode=OneWay}" /></Border>
                                        </Grid>
                                    </StackPanel>
                                </ScrollViewer>
                            </StackPanel>
                        </Border>

                        <Border Padding="20"
                                Background="{StaticResource ControlRoomPanelGradientBrush}"
                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                BorderThickness="1"
                                CornerRadius="24"
                                Visibility="{x:Bind ViewModel.Data.CandidateBoardVisibility, Mode=OneWay}">
                            <StackPanel Spacing="14">
                                <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="후보 시트" />
                                <ScrollViewer HorizontalScrollBarVisibility="Auto"
                                              HorizontalScrollMode="Enabled"
                                              VerticalScrollBarVisibility="Disabled"
                                              VerticalScrollMode="Disabled">
                                    <StackPanel Spacing="0">
                                        <Grid MinWidth="1050">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="120" />
                                                <ColumnDefinition Width="160" />
                                                <ColumnDefinition Width="200" />
                                                <ColumnDefinition Width="160" />
                                                <ColumnDefinition Width="120" />
                                                <ColumnDefinition Width="150" />
                                                <ColumnDefinition Width="140" />
                                            </Grid.ColumnDefinitions>
                                            <Border Grid.Column="0" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="후보코드" /></Border>
                                            <Border Grid.Column="1" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="이름" /></Border>
                                            <Border Grid.Column="2" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="정당" /></Border>
                                            <Border Grid.Column="3" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="득표수" /></Border>
                                            <Border Grid.Column="4" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="득표율(%)" /></Border>
                                            <Border Grid.Column="5" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="판정" /></Border>
                                            <Border Grid.Column="6" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="사진" /></Border>
                                        </Grid>

                                        <ItemsControl ItemsSource="{x:Bind ViewModel.Data.Candidates, Mode=OneWay}">
                                            <ItemsControl.ItemTemplate>
                                                <DataTemplate x:DataType="domain:CandidateEntry">
                                                    <Grid MinWidth="1050">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="120" />
                                                            <ColumnDefinition Width="160" />
                                                            <ColumnDefinition Width="200" />
                                                            <ColumnDefinition Width="160" />
                                                            <ColumnDefinition Width="120" />
                                                            <ColumnDefinition Width="150" />
                                                            <ColumnDefinition Width="140" />
                                                        </Grid.ColumnDefinitions>
                                                        <Border Grid.Column="0" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind CandidateCode}" TextWrapping="WrapWholeWords" /></Border>
                                                        <Border Grid.Column="1" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind Name}" TextWrapping="WrapWholeWords" /></Border>
                                                        <Border Grid.Column="2" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind Party}" TextWrapping="WrapWholeWords" /></Border>
                                                        <Border Grid.Column="3" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock FontFamily="Consolas" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind VoteCountDisplay}" TextAlignment="Right" /></Border>
                                                        <Border Grid.Column="4" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock FontFamily="Consolas" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind VoteRateDisplay}" TextAlignment="Right" /></Border>
                                                        <Border Grid.Column="5" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Foreground="{StaticResource ControlRoomSignalBlueBrush}" Text="{x:Bind EffectiveJudgementLabel}" TextAlignment="Center" TextWrapping="Wrap" /></Border>
                                                        <Border Grid.Column="6" Padding="12,10" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind HasImageLabel}" TextAlignment="Center" /></Border>
                                                    </Grid>
                                                </DataTemplate>
                                            </ItemsControl.ItemTemplate>
                                        </ItemsControl>
                                    </StackPanel>
                                </ScrollViewer>
                            </StackPanel>
                        </Border>

                    </StackPanel>
                </ScrollViewer>

                <ScrollViewer Visibility="{x:Bind ViewModel.CareerPromiseDataVisibility, Mode=OneWay}">
                    <StackPanel Spacing="20">
                        <Border Padding="20"
                                Background="{StaticResource ControlRoomPanelGradientBrush}"
                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                BorderThickness="1"
                                CornerRadius="24">
                            <StackPanel Spacing="16">
                                <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="공약데이터" />
                                <Grid ColumnSpacing="12" RowSpacing="12">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="220" />
                                        <ColumnDefinition Width="260" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <ComboBox Header="선거 종류"
                                              DisplayMemberPath="Label"
                                              ItemsSource="{x:Bind ViewModel.Data.CareerPromiseElectionTypeOptions, Mode=OneWay}"
                                              SelectedValue="{x:Bind ViewModel.Data.ElectionType, Mode=TwoWay}"
                                              SelectedValuePath="Value" />
                                    <ComboBox Grid.Column="1"
                                              Header="선거구명"
                                              DisplayMemberPath="Label"
                                              ItemsSource="{x:Bind ViewModel.Data.DistrictViewOptions, Mode=OneWay}"
                                              SelectedValue="{x:Bind ViewModel.Data.SelectedDistrictViewName, Mode=TwoWay}"
                                              SelectedValuePath="Value" />
                                    <StackPanel Grid.Column="2" VerticalAlignment="Bottom" Spacing="4">
                                        <TextBlock Style="{StaticResource ConsoleBodyTextStyle}"
                                                   Text="{x:Bind ViewModel.Data.CareerPromiseContextText, Mode=OneWay}"
                                                   TextWrapping="Wrap" />
                                        <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                                   Text="{x:Bind ViewModel.Data.StatusText, Mode=OneWay}"
                                                   TextWrapping="Wrap" />
                                    </StackPanel>
                                    <Button Grid.Column="3"
                                            Command="{x:Bind ViewModel.Data.ManualRefreshCommand}"
                                            Content="후보 갱신"
                                            Style="{StaticResource ConsolePrimaryButtonStyle}"
                                            VerticalAlignment="Bottom" />
                                </Grid>
                            </StackPanel>
                        </Border>

                        <Border Padding="20"
                                Background="{StaticResource ControlRoomPanelGradientBrush}"
                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                BorderThickness="1"
                                CornerRadius="24">
                            <StackPanel Spacing="14">
                                <Grid ColumnSpacing="12">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <StackPanel Spacing="4">
                                        <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="후보 공약" />
                                        <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                                   Text="{x:Bind ViewModel.Data.CareerPromiseStatusText, Mode=OneWay}"
                                                   TextWrapping="Wrap" />
                                        <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                                   Text="{x:Bind ViewModel.Data.CareerPromiseEditorStatusText, Mode=OneWay}"
                                                   TextWrapping="Wrap" />
                                    </StackPanel>
                                    <Button Grid.Column="1"
                                            Command="{x:Bind ViewModel.Data.AddCareerPromiseRowCommand}"
                                            Content="행 추가"
                                            Style="{StaticResource ConsolePrimaryButtonStyle}" />
                                </Grid>
                                <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                           Text="{x:Bind ViewModel.Data.CareerPromiseSaveStateText, Mode=OneWay}"
                                           TextWrapping="Wrap" />
                                <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                           Text="{x:Bind ViewModel.Data.CareerPromiseFilePath, Mode=OneWay}"
                                           TextWrapping="WrapWholeWords" />
                                <ScrollViewer HorizontalScrollBarVisibility="Auto"
                                              HorizontalScrollMode="Enabled"
                                              VerticalScrollBarVisibility="Disabled"
                                              VerticalScrollMode="Disabled">
                                    <StackPanel Spacing="0">
                                        <Grid MinWidth="1480">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="190" />
                                                <ColumnDefinition Width="120" />
                                                <ColumnDefinition Width="150" />
                                                <ColumnDefinition Width="170" />
                                                <ColumnDefinition Width="250" />
                                                <ColumnDefinition Width="250" />
                                                <ColumnDefinition Width="260" />
                                                <ColumnDefinition Width="90" />
                                            </Grid.ColumnDefinitions>
                                            <Border Grid.Column="0" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="선거구명" /></Border>
                                            <Border Grid.Column="1" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="후보코드" /></Border>
                                            <Border Grid.Column="2" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="이름" /></Border>
                                            <Border Grid.Column="3" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="정당" /></Border>
                                            <Border Grid.Column="4" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="공약 1" /></Border>
                                            <Border Grid.Column="5" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="공약 2" /></Border>
                                            <Border Grid.Column="6" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="공약 3" /></Border>
                                            <Border Grid.Column="7" Padding="12,10" Background="#0E1726" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="삭제" /></Border>
                                        </Grid>

                                        <ItemsControl ItemsSource="{x:Bind ViewModel.Data.CareerPromiseRows, Mode=OneWay}">
                                            <ItemsControl.ItemTemplate>
                                                <DataTemplate x:DataType="vm:CareerPromiseEditRowViewModel">
                                                    <Grid MinWidth="1480">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="190" />
                                                            <ColumnDefinition Width="120" />
                                                            <ColumnDefinition Width="150" />
                                                            <ColumnDefinition Width="170" />
                                                            <ColumnDefinition Width="250" />
                                                            <ColumnDefinition Width="250" />
                                                            <ColumnDefinition Width="260" />
                                                            <ColumnDefinition Width="90" />
                                                        </Grid.ColumnDefinitions>
                                                        <Border Grid.Column="0" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBox BorderThickness="0" Background="Transparent" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" PlaceholderText="선거구명" Text="{x:Bind DistrictName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" /></Border>
                                                        <Border Grid.Column="1" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBox BorderThickness="0" Background="Transparent" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" PlaceholderText="후보코드" Text="{x:Bind CandidateCode, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" /></Border>
                                                        <Border Grid.Column="2" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBox BorderThickness="0" Background="Transparent" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" PlaceholderText="이름" Text="{x:Bind CandidateName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" /></Border>
                                                        <Border Grid.Column="3" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBox BorderThickness="0" Background="Transparent" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" PlaceholderText="정당" Text="{x:Bind Party, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" /></Border>
                                                        <Border Grid.Column="4" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBox BorderThickness="0" Background="Transparent" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" PlaceholderText="첫 번째 공약" Text="{x:Bind Promise1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" /></Border>
                                                        <Border Grid.Column="5" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBox BorderThickness="0" Background="Transparent" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" PlaceholderText="두 번째 공약" Text="{x:Bind Promise2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" /></Border>
                                                        <Border Grid.Column="6" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><TextBox BorderThickness="0" Background="Transparent" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" PlaceholderText="세 번째 공약" Text="{x:Bind Promise3, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" /></Border>
                                                        <Border Grid.Column="7" Padding="8" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1"><Button Command="{x:Bind DeleteCommand}" Content="삭제" Style="{StaticResource ConsoleGhostButtonStyle}" /></Border>
                                                    </Grid>
                                                </DataTemplate>
                                            </ItemsControl.ItemTemplate>
                                        </ItemsControl>
                                    </StackPanel>
                                </ScrollViewer>
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </ScrollViewer>

                <ScrollViewer Visibility="{x:Bind ViewModel.CutListVisibility, Mode=OneWay}">
                    <StackPanel Spacing="20">
                        <Border Padding="20"
                                Background="{StaticResource ControlRoomPanelGradientBrush}"
                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                BorderThickness="1"
                                CornerRadius="24">
                            <StackPanel Spacing="16">
                                <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="현재 송출 컷" />
                                <Grid ColumnSpacing="12" RowSpacing="12">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="220" />
                                        <ColumnDefinition Width="220" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <ComboBox Header="채널 보기"
                                              DisplayMemberPath="Label"
                                              ItemsSource="{x:Bind ViewModel.CutListFilterOptions, Mode=OneWay}"
                                              SelectedItem="{x:Bind ViewModel.SelectedCutListFilterOption, Mode=TwoWay}" />
                                    <ComboBox Grid.Column="1"
                                              Header="컷 분류"
                                              DisplayMemberPath="Label"
                                              ItemsSource="{x:Bind ViewModel.CutListCategoryOptions, Mode=OneWay}"
                                              SelectedItem="{x:Bind ViewModel.SelectedCutListCategoryOption, Mode=TwoWay}" />
                                    <Border Grid.Column="2"
                                            Padding="14"
                                            Background="#132338"
                                            BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                            BorderThickness="1"
                                            CornerRadius="16">
                                        <StackPanel Spacing="4">
                                            <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="컷 표시 현황" />
                                            <TextBlock Style="{StaticResource ConsoleBodyTextStyle}"
                                                       Text="{x:Bind ViewModel.CutListSummary, Mode=OneWay}" />
                                            <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                                       Text="{x:Bind ViewModel.CutThumbnailSummary, Mode=OneWay}"
                                                       TextWrapping="Wrap" />
                                        </StackPanel>
                                    </Border>
                                    <StackPanel Grid.Column="3"
                                                HorizontalAlignment="Right"
                                                Spacing="6">
                                        <Button Command="{x:Bind ViewModel.GenerateCutThumbnailsCommand, Mode=OneWay}"
                                                Content="썸네일 생성"
                                                Style="{StaticResource ConsoleGhostButtonStyle}" />
                                        <TextBlock MaxWidth="240"
                                                   Style="{StaticResource ConsoleLabelTextStyle}"
                                                   Text="{x:Bind ViewModel.ThumbnailGenerationStatus, Mode=OneWay}"
                                                   TextAlignment="Right"
                                                   TextWrapping="WrapWholeWords" />
                                    </StackPanel>
                                </Grid>
                                <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                           Text="기본 송출 시간을 조정한 뒤 확인을 누르면 이후 송출과 대기열 표시값에 반영됩니다."
                                           TextWrapping="Wrap" />
                            </StackPanel>
                        </Border>

                        <Border Padding="20"
                                Background="{StaticResource ControlRoomPanelGradientBrush}"
                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                BorderThickness="1"
                                CornerRadius="24">
                            <StackPanel Spacing="14">
                                <Grid ColumnSpacing="12">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="110" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="220" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="썸네일" />
                                    <TextBlock Grid.Column="1" Style="{StaticResource ConsoleLabelTextStyle}" Text="권장 채널" />
                                    <TextBlock Grid.Column="2" Style="{StaticResource ConsoleLabelTextStyle}" Text="컷 이름" />
                                    <TextBlock Grid.Column="3" Style="{StaticResource ConsoleLabelTextStyle}" Text="기본 시간(초)" />
                                </Grid>

                                <ListView ItemsSource="{x:Bind ViewModel.CutListItems, Mode=OneWay}"
                                          SelectionMode="None"
                                          ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                                    <ListView.ItemTemplate>
                                        <DataTemplate x:DataType="vm:CutListEntryViewModel">
                                            <Border Margin="0,0,0,10"
                                                    Padding="14,12"
                                                    Background="#132338"
                                                    BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                                    BorderThickness="1"
                                                    CornerRadius="8">
                                                <Grid ColumnSpacing="12">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="Auto" />
                                                        <ColumnDefinition Width="110" />
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="220" />
                                                    </Grid.ColumnDefinitions>

                                                    <Border Width="{x:Bind ThumbnailWidth, Mode=OneWay}"
                                                            Height="{x:Bind ThumbnailHeight, Mode=OneWay}"
                                                            Background="#0B1624"
                                                            BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                                            BorderThickness="1"
                                                            CornerRadius="6">
                                                        <Image Source="{x:Bind ThumbnailSource, Mode=OneWay}"
                                                               Stretch="Uniform" />
                                                    </Border>

                                                    <StackPanel Grid.Column="1" Spacing="4">
                                                        <TextBlock FontFamily="Bahnschrift SemiBold"
                                                                   FontSize="16"
                                                                   Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                                   Text="{x:Bind ChannelLabel}" />
                                                        <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                                                   Text="{x:Bind SourceFolder}"
                                                                   TextWrapping="Wrap" />
                                                    </StackPanel>

                                                    <StackPanel Grid.Column="2" Spacing="4">
                                                        <TextBlock FontFamily="Bahnschrift SemiBold"
                                                                   FontSize="16"
                                                                   Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                                   Text="{x:Bind FormatName}"
                                                                   TextWrapping="Wrap" />
                                                        <TextBlock Style="{StaticResource ConsoleBodyTextStyle}"
                                                                   Text="{x:Bind CutName}"
                                                                   TextWrapping="Wrap" />
                                                        <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                                                   Text="{x:Bind Description}"
                                                                   TextWrapping="Wrap" />
                                                    </StackPanel>

                                                    <StackPanel Grid.Column="3"
                                                                VerticalAlignment="Center"
                                                                Orientation="Horizontal"
                                                                Spacing="6">
                                                        <NumberBox Width="92"
                                                                   Height="34"
                                                                   MinHeight="34"
                                                                   VerticalAlignment="Center"
                                                                   FontSize="14"
                                                                   Minimum="{x:Bind MinimumDurationSeconds, Mode=OneWay}"
                                                                   SmallChange="1"
                                                                   SpinButtonPlacementMode="Hidden"
                                                                   Value="{x:Bind DraftDurationSeconds, Mode=TwoWay}" />
                                                        <StackPanel VerticalAlignment="Center"
                                                                    Spacing="2">
                                                            <Button Width="48"
                                                                    Height="24"
                                                                    MinWidth="48"
                                                                    MinHeight="24"
                                                                    Padding="0"
                                                                    Command="{x:Bind IncreaseDurationCommand}"
                                                                    Content="▲"
                                                                    Style="{StaticResource ConsoleGhostButtonStyle}" />
                                                            <Button Width="48"
                                                                    Height="24"
                                                                    MinWidth="48"
                                                                    MinHeight="24"
                                                                    Padding="0"
                                                                    Command="{x:Bind ApplyDurationCommand}"
                                                                    Content="확인"
                                                                    FontSize="12"
                                                                    IsEnabled="{x:Bind HasPendingDurationChange, Mode=OneWay}"
                                                                    Style="{StaticResource ConsolePrimaryButtonStyle}" />
                                                            <Button Width="48"
                                                                    Height="24"
                                                                    MinWidth="48"
                                                                    MinHeight="24"
                                                                    Padding="0"
                                                                    Command="{x:Bind DecreaseDurationCommand}"
                                                                    Content="▼"
                                                                    Style="{StaticResource ConsoleGhostButtonStyle}" />
                                                        </StackPanel>
                                                        <TextBlock VerticalAlignment="Center"
                                                                   Style="{StaticResource ConsoleLabelTextStyle}"
                                                                   Text="초" />
                                                    </StackPanel>
                                                </Grid>
                                            </Border>
                                        </DataTemplate>
                                    </ListView.ItemTemplate>
                                </ListView>
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </ScrollViewer>

                <ScrollViewer Visibility="{x:Bind ViewModel.SettingsVisibility, Mode=OneWay}">
                    <StackPanel Spacing="20">
                        <Grid ColumnSpacing="20">
                            <Grid.ColumnDefinitions><ColumnDefinition Width="1.2*" /><ColumnDefinition Width="0.8*" /></Grid.ColumnDefinitions>
                            <Border Padding="20" Background="{StaticResource ControlRoomPanelGradientBrush}" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="24">
                                <StackPanel Spacing="14">
                                    <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="방송사 프로필" />
                                    <Grid ColumnSpacing="12"><Grid.ColumnDefinitions><ColumnDefinition Width="280" /><ColumnDefinition Width="*" /></Grid.ColumnDefinitions>
                                        <ComboBox DisplayMemberPath="Name" Header="방송사" ItemsSource="{x:Bind ViewModel.Settings.Stations, Mode=OneWay}" SelectedValue="{x:Bind ViewModel.Settings.SelectedStationId, Mode=TwoWay}" SelectedValuePath="Id" />
                                        <Grid Grid.Column="1" ColumnSpacing="10">
                                            <Grid.ColumnDefinitions><ColumnDefinition Width="*" /></Grid.ColumnDefinitions>
                                            <TextBox IsReadOnly="True"
                                                     IsSpellCheckEnabled="False"
                                                     Text="{x:Bind ViewModel.Settings.ImageRootPath, Mode=OneWay}">
                                                <TextBox.Header>
                                                    <StackPanel Orientation="Horizontal" Spacing="6">
                                                        <TextBlock Text="T3_Cut 고정 경로" />
                                                        <Button Width="22"
                                                                Height="22"
                                                                MinWidth="22"
                                                                MinHeight="22"
                                                                Padding="0"
                                                                VerticalAlignment="Center"
                                                                Content="?"
                                                                FontFamily="Bahnschrift SemiBold"
                                                                FontSize="11">
                                                            <Button.Flyout>
                                                                <Flyout>
                                                                    <TextBlock MaxWidth="260"
                                                                               Text="송출과 디버깅에 사용할 .tscn 컷 폴더입니다. 기준 경로는 D:\Elect2026\T3_Cut로 고정됩니다."
                                                                               TextWrapping="WrapWholeWords" />
                                                                </Flyout>
                                                            </Button.Flyout>
                                                        </Button>
                                                    </StackPanel>
                                                </TextBox.Header>
                                            </TextBox>
                                        </Grid>
                                    </Grid>
                                    <Grid ColumnSpacing="12">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="280" />
                                            <ColumnDefinition Width="*" />
                                        </Grid.ColumnDefinitions>

                                        <ComboBox DisplayMemberPath="Label"
                                                  Header="비디오월 화면"
                                                  ItemsSource="{x:Bind ViewModel.Settings.VideoWallLayoutOptions, Mode=OneWay}"
                                                  SelectedValue="{x:Bind ViewModel.Settings.SelectedStationVideoWallLayoutPresetSelection, Mode=TwoWay}"
                                                  SelectedValuePath="Value" />

                                        <Border Grid.Column="1"
                                                Padding="14,10"
                                                Background="#132338"
                                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                                BorderThickness="1"
                                                CornerRadius="16">
                                            <StackPanel Spacing="4">
                                                <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="현재 비디오월 기준" />
                                                <TextBlock FontFamily="Bahnschrift SemiBold"
                                                           FontSize="18"
                                                           Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                           Text="{x:Bind ViewModel.Settings.SelectedStationVideoWallLayoutSummary, Mode=OneWay}" />
                                            </StackPanel>
                                        </Border>
                                    </Grid>
                                </StackPanel>
                            </Border>
                            <Border Grid.Column="1" Padding="20" Background="{StaticResource ControlRoomPanelGradientBrush}" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="24">
                                <StackPanel Spacing="12">
                                    <StackPanel Orientation="Horizontal" Spacing="8">
                                        <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="시작 및 복원 옵션" />
                                        <Button Width="22"
                                                Height="22"
                                                MinWidth="22"
                                                MinHeight="22"
                                                Padding="0"
                                                VerticalAlignment="Center"
                                                Content="?"
                                                FontFamily="Bahnschrift SemiBold"
                                                FontSize="11">
                                            <Button.Flyout>
                                                <Flyout>
                                                    <TextBlock MaxWidth="260"
                                                               Text="앱 시작 시 이전 상태를 얼마나 복원할지 정합니다. 처음에는 기본값으로 두고 필요한 항목만 켜면 됩니다."
                                                               TextWrapping="WrapWholeWords" />
                                                </Flyout>
                                            </Button.Flyout>
                                        </Button>
                                    </StackPanel>
                                    <CheckBox Content="스케줄 복원" IsChecked="{x:Bind ViewModel.RestoreSelection.RestoreSchedules, Mode=TwoWay}" />
                                    <CheckBox Content="방송사 설정 복원" IsChecked="{x:Bind ViewModel.RestoreSelection.RestoreStations, Mode=TwoWay}" />
                                    <CheckBox Content="상태값 복원" IsChecked="{x:Bind ViewModel.RestoreSelection.RestoreStatusValues, Mode=TwoWay}" />
                                    <ToggleSwitch Header="디버그 기능"
                                                  IsOn="{x:Bind ViewModel.Settings.IsDebugFeaturesEnabled, Mode=TwoWay}"
                                                  OffContent="OFF"
                                                  OnContent="ON" />
                                    <ToggleSwitch Header="API 자동 갱신" IsOn="{x:Bind ViewModel.Data.IsPollingEnabled, Mode=TwoWay}" />
                                    <TextBlock Style="{StaticResource ConsoleLabelTextStyle}"
                                               Text="API 갱신 주기: 60초 고정"
                                               TextWrapping="Wrap" />
                                </StackPanel>
                            </Border>
                        </Grid>

                        <Border Padding="20" Background="{StaticResource ControlRoomPanelGradientBrush}" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="24">
                            <StackPanel Spacing="14">
                                <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="Karisma 레이어" />
                                <Grid ColumnSpacing="12">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <NumberBox Header="노멀"
                                               Maximum="99"
                                               Minimum="0"
                                               SmallChange="1"
                                               SpinButtonPlacementMode="Compact"
                                               Value="{x:Bind ViewModel.Settings.NormalLayerNo, Mode=TwoWay}" />
                                    <NumberBox Grid.Column="1"
                                               Header="좌상단"
                                               Maximum="99"
                                               Minimum="0"
                                               SmallChange="1"
                                               SpinButtonPlacementMode="Compact"
                                               Value="{x:Bind ViewModel.Settings.TopLeftLayerNo, Mode=TwoWay}" />
                                    <NumberBox Grid.Column="2"
                                               Header="하단"
                                               Maximum="99"
                                               Minimum="0"
                                               SmallChange="1"
                                               SpinButtonPlacementMode="Compact"
                                               Value="{x:Bind ViewModel.Settings.BottomLayerNo, Mode=TwoWay}" />
                                    <NumberBox Grid.Column="3"
                                               Header="비디오월"
                                               Maximum="99"
                                               Minimum="0"
                                               SmallChange="1"
                                               SpinButtonPlacementMode="Compact"
                                               Value="{x:Bind ViewModel.Settings.VideoWallLayerNo, Mode=TwoWay}" />
                                </Grid>
                            </StackPanel>
                        </Border>

                        <Border Padding="20" Background="{StaticResource ControlRoomPanelGradientBrush}" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="24">
                            <StackPanel Spacing="14">
                                <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="권역 설정" />
                                <Grid ColumnSpacing="16" RowSpacing="16">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="280" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>

                                    <Border Padding="18" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="18">
                                        <StackPanel Spacing="6">
                                            <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="현재 대상" />
                                            <TextBlock FontFamily="Bahnschrift SemiBold" FontSize="26" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind ViewModel.Settings.SelectedStation.Name, Mode=OneWay}" />
                                            <TextBlock Style="{StaticResource ConsoleBodyTextStyle}" Text="{x:Bind ViewModel.Settings.SelectedStationRegionSummary, Mode=OneWay}" />
                                        </StackPanel>
                                    </Border>

                                    <Border Grid.Column="1" Padding="18" Background="#101C2E" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="18">
                                        <StackPanel Spacing="8" VerticalAlignment="Center">
                                            <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="권역" />
                                            <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="{x:Bind ViewModel.Settings.SelectedStation.RegionFiltersText, Mode=OneWay}" />
                                        </StackPanel>
                                    </Border>

                                    <ListView Grid.Row="1"
                                              Grid.ColumnSpan="2"
                                              ItemsSource="{x:Bind ViewModel.Settings.SelectedStationRegions, Mode=OneWay}"
                                              IsItemClickEnabled="False"
                                              SelectionMode="None"
                                              ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                                        <ListView.ItemsPanel>
                                            <ItemsPanelTemplate>
                                                <ItemsWrapGrid MaximumRowsOrColumns="4" Orientation="Horizontal" />
                                            </ItemsPanelTemplate>
                                        </ListView.ItemsPanel>
                                        <ListView.ItemTemplate>
                                            <DataTemplate x:DataType="vm:RegionOptionViewModel">
                                                <Border Margin="0,0,12,12"
                                                        Padding="14,12"
                                                        MinWidth="150"
                                                        Background="#132338"
                                                        BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                                        BorderThickness="1"
                                                        CornerRadius="14">
                                                    <CheckBox IsChecked="{x:Bind IsSelected, Mode=TwoWay}">
                                                        <TextBlock FontFamily="Bahnschrift SemiBold"
                                                                   FontSize="16"
                                                                   Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                                   Text="{x:Bind Name}" />
                                                    </CheckBox>
                                                </Border>
                                            </DataTemplate>
                                        </ListView.ItemTemplate>
                                    </ListView>
                                </Grid>
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </ScrollViewer>

                <ScrollViewer Visibility="{x:Bind ViewModel.LogVisibility, Mode=OneWay}">
                    <StackPanel Spacing="20">
                        <Border Padding="20" Background="{StaticResource ControlRoomPanelGradientBrush}" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="24">
                            <StackPanel Spacing="14">
                                <Grid ColumnSpacing="16">
                                    <Grid.ColumnDefinitions><ColumnDefinition Width="*" /><ColumnDefinition Width="Auto" /></Grid.ColumnDefinitions>
                                    <TextBlock Style="{StaticResource ConsoleSectionTitleTextStyle}" Text="시스템 이벤트 로그" />
                                    <Button Grid.Column="1" Command="{x:Bind ViewModel.ClearLogsCommand}" Content="로그 비우기" Style="{StaticResource ConsoleGhostButtonStyle}" />
                                </Grid>
                                <Grid ColumnSpacing="12" RowSpacing="12">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="220" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <ComboBox Header="표시 수준"
                                              DisplayMemberPath="Label"
                                              ItemsSource="{x:Bind ViewModel.LogFilterOptions, Mode=OneWay}"
                                              SelectedItem="{x:Bind ViewModel.SelectedLogFilterOption, Mode=TwoWay}" />
                                    <Border Grid.Column="1" Padding="14" Background="#132338" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="16">
                                        <StackPanel Spacing="4">
                                            <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="로그 표시 현황" />
                                            <TextBlock FontFamily="Bahnschrift SemiBold" FontSize="18" Foreground="{StaticResource ControlRoomTextPrimaryBrush}" Text="{x:Bind ViewModel.LogFilterSummary, Mode=OneWay}" />
                                        </StackPanel>
                                    </Border>
                                </Grid>
                            </StackPanel>
                        </Border>
                        <Border Padding="16" Background="#09111D" BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}" BorderThickness="1" CornerRadius="24">
                            <ListView ItemsSource="{x:Bind ViewModel.FilteredLogs, Mode=OneWay}" SelectionMode="None">
                                <ListView.ItemTemplate>
                                    <DataTemplate x:DataType="domain:LogEntry">
                                        <Border Margin="0,0,0,8" Padding="12" Background="#102033" BorderBrush="#203852" BorderThickness="1" CornerRadius="14">
                                            <StackPanel Spacing="6">
                                                <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="{x:Bind LevelLabel}" />
                                                <TextBlock FontFamily="Consolas" Foreground="{StaticResource ControlRoomTextSecondaryBrush}" Text="{x:Bind Display}" TextWrapping="WrapWholeWords" />
                                            </StackPanel>
                                        </Border>
                                    </DataTemplate>
                                </ListView.ItemTemplate>
                            </ListView>
                        </Border>
                    </StackPanel>
                </ScrollViewer>
            </Grid>
        </Grid>
    </NavigationView>
</Window>


