<?xml version="1.0" encoding="UTF-8" ?>
<Page
    x:Class="TornadoAce_CJOnStyle.Views.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vm="using:TornadoAce_CJOnStyle.ViewModels"
    mc:Ignorable="d">
    <Page.Resources>
        <Storyboard x:Name="LoginIntroStoryboard">
            <DoubleAnimation
                Storyboard.TargetName="LoginBackgroundScale"
                Storyboard.TargetProperty="ScaleX"
                From="1.07"
                To="1.015"
                Duration="0:0:8"
                EnableDependentAnimation="True" />
            <DoubleAnimation
                Storyboard.TargetName="LoginBackgroundScale"
                Storyboard.TargetProperty="ScaleY"
                From="1.07"
                To="1.015"
                Duration="0:0:8"
                EnableDependentAnimation="True" />
        </Storyboard>
    </Page.Resources>
    <Page.Content>
        <Grid Background="{StaticResource AppBackgroundBrush}">
        <NavigationView
            x:Name="MainShell"
            AlwaysShowHeader="False"
            Background="{StaticResource AppChromeBrush}"
            IsBackButtonVisible="Collapsed"
            IsSettingsVisible="False"
            PaneDisplayMode="LeftCompact"
            RequestedTheme="Dark"
            Visibility="{x:Bind ViewModel.MainShellVisibility, Mode=OneWay}">
            <NavigationView.PaneHeader>
                <StackPanel Margin="12,18,12,12" Spacing="4">
                    <TextBlock Style="{StaticResource LabelTextStyle}" Text="TORNADOACE" />
                    <TextBlock
                        FontFamily="Bahnschrift SemiBold"
                        FontSize="16"
                        Foreground="{StaticResource TextPrimaryBrush}"
                        Text="CJ OnStyle" />
                    <TextBlock
                        Style="{StaticResource LabelTextStyle}"
                        Text="{x:Bind ViewModel.BuildPhase, Mode=OneWay}" />
                </StackPanel>
            </NavigationView.PaneHeader>
            <NavigationView.MenuItems>
                <NavigationViewItem Content="대시보드" IsSelected="True">
                    <NavigationViewItem.Icon>
                        <SymbolIcon Symbol="Home" />
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
                <NavigationViewItem Content="큐시트">
                    <NavigationViewItem.Icon>
                        <SymbolIcon Symbol="Library" />
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
                <NavigationViewItem Content="매핑">
                    <NavigationViewItem.Icon>
                        <SymbolIcon Symbol="Map" />
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
                <NavigationViewItem Content="검수">
                    <NavigationViewItem.Icon>
                        <SymbolIcon Symbol="Accept" />
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
                <NavigationViewItem Content="연동">
                    <NavigationViewItem.Icon>
                        <SymbolIcon Symbol="Sync" />
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
                <NavigationViewItem Content="설정">
                    <NavigationViewItem.Icon>
                        <SymbolIcon Symbol="Setting" />
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
            </NavigationView.MenuItems>

            <ScrollViewer
                Background="{StaticResource AppBackgroundBrush}"
                HorizontalScrollBarVisibility="Auto"
                HorizontalScrollMode="Auto"
                VerticalScrollBarVisibility="Auto"
                VerticalScrollMode="Auto">
                <Grid
                    MinWidth="1180"
                    Margin="24"
                    RowSpacing="18">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

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

                        <StackPanel Spacing="6">
                            <TextBlock
                                Style="{StaticResource PageTitleTextStyle}"
                                Text="CG 제작 자동화 컨트롤" />
                            <TextBlock
                                MaxWidth="880"
                                Style="{StaticResource BodyTextStyle}"
                                Text="{x:Bind ViewModel.OperatorMessage, Mode=OneWay}" />
                        </StackPanel>

                        <StackPanel
                            Grid.Column="1"
                            Orientation="Horizontal"
                            Spacing="10"
                            VerticalAlignment="Top">
                            <Button
                                Command="{x:Bind ViewModel.RefreshCueSheetCommand}"
                                Style="{StaticResource GhostActionButtonStyle}">
                                <StackPanel Orientation="Horizontal" Spacing="7">
                                    <SymbolIcon Symbol="Refresh" />
                                    <TextBlock Text="큐시트 동기화" />
                                </StackPanel>
                            </Button>
                            <Button
                                Command="{x:Bind ViewModel.GenerateSceneCommand}"
                                Style="{StaticResource PrimaryActionButtonStyle}">
                                <StackPanel Orientation="Horizontal" Spacing="7">
                                    <SymbolIcon Symbol="Play" />
                                    <TextBlock Text="Scene 생성" />
                                </StackPanel>
                            </Button>
                            <Button
                                Command="{x:Bind ViewModel.RunInspectionCommand}"
                                Style="{StaticResource GhostActionButtonStyle}">
                                <StackPanel Orientation="Horizontal" Spacing="7">
                                    <SymbolIcon Symbol="Accept" />
                                    <TextBlock Text="검수 실행" />
                                </StackPanel>
                            </Button>
                        </StackPanel>
                    </Grid>

                    <ItemsControl
                        Grid.Row="1"
                        ItemsSource="{x:Bind ViewModel.StatusCards, Mode=OneWay}">
                        <ItemsControl.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Horizontal" />
                            </ItemsPanelTemplate>
                        </ItemsControl.ItemsPanel>
                        <ItemsControl.ItemTemplate>
                            <DataTemplate x:DataType="vm:StatusCardViewModel">
                                <Border
                                    Width="268"
                                    Margin="0,0,12,0"
                                    Padding="14"
                                    Background="{StaticResource PanelBrush}"
                                    BorderBrush="{StaticResource PanelStrokeBrush}"
                                    BorderThickness="1"
                                    CornerRadius="8">
                                    <Grid ColumnSpacing="12">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="*" />
                                        </Grid.ColumnDefinitions>
                                        <Border
                                            Width="34"
                                            Height="34"
                                            Background="{x:Bind AccentBrush}"
                                            CornerRadius="8">
                                            <SymbolIcon
                                                Foreground="#071013"
                                                Symbol="{x:Bind Icon}" />
                                        </Border>
                                        <StackPanel Grid.Column="1" Spacing="4">
                                            <TextBlock
                                                Style="{StaticResource LabelTextStyle}"
                                                Text="{x:Bind Label}" />
                                            <TextBlock
                                                FontFamily="Bahnschrift SemiBold"
                                                FontSize="24"
                                                Foreground="{StaticResource TextPrimaryBrush}"
                                                Text="{x:Bind Metric}" />
                                            <TextBlock
                                                Style="{StaticResource LabelTextStyle}"
                                                Text="{x:Bind Detail}" />
                                        </StackPanel>
                                    </Grid>
                                </Border>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>

                    <Grid
                        Grid.Row="2"
                        ColumnSpacing="16"
                        RowSpacing="16">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="1.2*" />
                            <ColumnDefinition Width="1.4*" />
                            <ColumnDefinition Width="1.1*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="380" />
                            <RowDefinition Height="330" />
                        </Grid.RowDefinitions>

                        <Border
                            Padding="16"
                            Background="{StaticResource PanelBrush}"
                            BorderBrush="{StaticResource PanelStrokeBrush}"
                            BorderThickness="1"
                            CornerRadius="8">
                            <StackPanel Spacing="14">
                                <Grid>
                                    <TextBlock Style="{StaticResource SectionTitleTextStyle}" Text="업무 파이프라인" />
                                    <TextBlock
                                        HorizontalAlignment="Right"
                                        Style="{StaticResource LabelTextStyle}"
                                        Text="{x:Bind ViewModel.LastCueSheetSyncText, Mode=OneWay}" />
                                </Grid>
                                <ListView
                                    ItemsSource="{x:Bind ViewModel.PipelineSteps, Mode=OneWay}"
                                    SelectionMode="None">
                                    <ListView.ItemTemplate>
                                        <DataTemplate x:DataType="vm:PipelineStepViewModel">
                                            <Grid
                                                Margin="0,0,0,8"
                                                ColumnSpacing="12">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="42" />
                                                    <ColumnDefinition Width="*" />
                                                </Grid.ColumnDefinitions>
                                                <Border
                                                    Width="34"
                                                    Height="34"
                                                    Background="{x:Bind AccentBrush}"
                                                    CornerRadius="8">
                                                    <TextBlock
                                                        HorizontalAlignment="Center"
                                                        VerticalAlignment="Center"
                                                        FontFamily="Cascadia Mono"
                                                        Foreground="#071013"
                                                        Text="{x:Bind StepNumber}" />
                                                </Border>
                                                <StackPanel Grid.Column="1" Spacing="5">
                                                    <Grid>
                                                        <TextBlock
                                                            FontFamily="Bahnschrift SemiBold"
                                                            Foreground="{StaticResource TextPrimaryBrush}"
                                                            Text="{x:Bind Title}" />
                                                        <TextBlock
                                                            HorizontalAlignment="Right"
                                                            Style="{StaticResource LabelTextStyle}"
                                                            Text="{x:Bind Status}" />
                                                    </Grid>
                                                    <TextBlock
                                                        Style="{StaticResource LabelTextStyle}"
                                                        Text="{x:Bind SystemName}" />
                                                    <ProgressBar
                                                        Height="6"
                                                        Maximum="100"
                                                        Value="{x:Bind Completion}" />
                                                </StackPanel>
                                            </Grid>
                                        </DataTemplate>
                                    </ListView.ItemTemplate>
                                </ListView>
                            </StackPanel>
                        </Border>

                        <Border
                            Grid.Column="1"
                            Padding="16"
                            Background="{StaticResource PanelBrush}"
                            BorderBrush="{StaticResource PanelStrokeBrush}"
                            BorderThickness="1"
                            CornerRadius="8">
                            <StackPanel Spacing="14">
                                <Grid>
                                    <TextBlock Style="{StaticResource SectionTitleTextStyle}" Text="Scene 필드 매핑" />
                                    <TextBlock
                                        HorizontalAlignment="Right"
                                        Style="{StaticResource LabelTextStyle}"
                                        Text="{x:Bind ViewModel.ActiveTemplateName, Mode=OneWay}" />
                                </Grid>
                                <Border
                                    Padding="10,8"
                                    Background="{StaticResource PanelAltBrush}"
                                    CornerRadius="8">
                                    <Grid ColumnSpacing="10">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="1.1*" />
                                            <ColumnDefinition Width="1.2*" />
                                            <ColumnDefinition Width="1.1*" />
                                            <ColumnDefinition Width="0.8*" />
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Style="{StaticResource LabelTextStyle}" Text="큐시트 필드" />
                                        <TextBlock Grid.Column="1" Style="{StaticResource LabelTextStyle}" Text="Tornado 객체" />
                                        <TextBlock Grid.Column="2" Style="{StaticResource LabelTextStyle}" Text="매핑 규칙" />
                                        <TextBlock Grid.Column="3" Style="{StaticResource LabelTextStyle}" Text="속성" />
                                    </Grid>
                                </Border>
                                <ListView
                                    ItemsSource="{x:Bind ViewModel.FieldMappings, Mode=OneWay}"
                                    SelectionMode="None">
                                    <ListView.ItemTemplate>
                                        <DataTemplate x:DataType="vm:FieldMappingViewModel">
                                            <Border Padding="10,7">
                                                <Grid ColumnSpacing="10">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="1.1*" />
                                                        <ColumnDefinition Width="1.2*" />
                                                        <ColumnDefinition Width="1.1*" />
                                                        <ColumnDefinition Width="0.8*" />
                                                    </Grid.ColumnDefinitions>
                                                    <TextBlock
                                                        Style="{StaticResource MonoTextStyle}"
                                                        Text="{x:Bind CueSheetField}" />
                                                    <TextBlock
                                                        Grid.Column="1"
                                                        Style="{StaticResource BodyTextStyle}"
                                                        Text="{x:Bind SceneObject}" />
                                                    <TextBlock
                                                        Grid.Column="2"
                                                        Style="{StaticResource BodyTextStyle}"
                                                        Text="{x:Bind BindingRule}" />
                                                    <TextBlock
                                                        Grid.Column="3"
                                                        Style="{StaticResource LabelTextStyle}"
                                                        Text="{x:Bind Attribute}" />
                                                </Grid>
                                            </Border>
                                        </DataTemplate>
                                    </ListView.ItemTemplate>
                                </ListView>
                            </StackPanel>
                        </Border>

                        <Border
                            Grid.Column="2"
                            Padding="16"
                            Background="{StaticResource PanelBrush}"
                            BorderBrush="{StaticResource PanelStrokeBrush}"
                            BorderThickness="1"
                            CornerRadius="8">
                            <ScrollViewer VerticalScrollBarVisibility="Auto" VerticalScrollMode="Auto">
                                <StackPanel Spacing="14">
                                    <TextBlock Style="{StaticResource SectionTitleTextStyle}" Text="연동 엔드포인트" />
                                    <ItemsControl ItemsSource="{x:Bind ViewModel.Endpoints, Mode=OneWay}">
                                        <ItemsControl.ItemTemplate>
                                            <DataTemplate x:DataType="vm:IntegrationEndpointViewModel">
                                                <Grid
                                                    Margin="0,0,0,10"
                                                    ColumnSpacing="10">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="Auto" />
                                                        <ColumnDefinition Width="*" />
                                                    </Grid.ColumnDefinitions>
                                                    <Ellipse
                                                        Width="10"
                                                        Height="10"
                                                        Margin="0,5,0,0"
                                                        Fill="{x:Bind StatusBrush}" />
                                                    <StackPanel Grid.Column="1" Spacing="3">
                                                        <TextBlock
                                                            FontFamily="Bahnschrift SemiBold"
                                                            Foreground="{StaticResource TextPrimaryBrush}"
                                                            Text="{x:Bind Name}" />
                                                        <TextBlock
                                                            Style="{StaticResource MonoTextStyle}"
                                                            Text="{x:Bind Endpoint}" />
                                                        <TextBlock
                                                            Style="{StaticResource LabelTextStyle}"
                                                            Text="{x:Bind OwnerAndStatus}" />
                                                    </StackPanel>
                                                </Grid>
                                            </DataTemplate>
                                        </ItemsControl.ItemTemplate>
                                    </ItemsControl>

                                    <Border
                                        Height="1"
                                        Background="{StaticResource PanelStrokeBrush}" />

                                    <TextBlock Style="{StaticResource SectionTitleTextStyle}" Text="RFP 커버리지" />
                                    <ItemsControl ItemsSource="{x:Bind ViewModel.RequirementCoverage, Mode=OneWay}">
                                        <ItemsControl.ItemTemplate>
                                            <DataTemplate x:DataType="vm:PocRequirementViewModel">
                                                <Grid
                                                    Margin="0,0,0,10"
                                                    ColumnSpacing="10">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="56" />
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <TextBlock
                                                        FontFamily="Cascadia Mono"
                                                        FontSize="12"
                                                        Foreground="{StaticResource TextMutedBrush}"
                                                        Text="{x:Bind RequirementId}" />
                                                    <StackPanel Grid.Column="1" Spacing="2">
                                                        <TextBlock
                                                            FontFamily="Bahnschrift SemiBold"
                                                            Foreground="{StaticResource TextPrimaryBrush}"
                                                            Text="{x:Bind Title}"
                                                            TextTrimming="CharacterEllipsis" />
                                                        <TextBlock
                                                            Style="{StaticResource LabelTextStyle}"
                                                            Text="{x:Bind Evidence}"
                                                            TextTrimming="CharacterEllipsis" />
                                                    </StackPanel>
                                                    <Border
                                                        Grid.Column="2"
                                                        Padding="8,3"
                                                        Background="{x:Bind StatusBrush}"
                                                        CornerRadius="8">
                                                        <TextBlock
                                                            FontFamily="Bahnschrift SemiBold"
                                                            FontSize="12"
                                                            Foreground="#071013"
                                                            Text="{x:Bind Status}" />
                                                    </Border>
                                                </Grid>
                                            </DataTemplate>
                                        </ItemsControl.ItemTemplate>
                                    </ItemsControl>
                                </StackPanel>
                            </ScrollViewer>
                        </Border>

                        <Border
                            Grid.Row="1"
                            Grid.ColumnSpan="2"
                            Padding="16"
                            Background="{StaticResource PanelBrush}"
                            BorderBrush="{StaticResource PanelStrokeBrush}"
                            BorderThickness="1"
                            CornerRadius="8">
                            <StackPanel Spacing="14">
                                <Grid>
                                    <TextBlock Style="{StaticResource SectionTitleTextStyle}" Text="자동 검수 큐" />
                                    <TextBlock
                                        HorizontalAlignment="Right"
                                        Style="{StaticResource LabelTextStyle}"
                                        Text="{x:Bind ViewModel.InspectionSummary, Mode=OneWay}" />
                                </Grid>
                                <Border
                                    Padding="10,8"
                                    Background="{StaticResource PanelAltBrush}"
                                    CornerRadius="8">
                                    <Grid ColumnSpacing="10">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="1.1*" />
                                            <ColumnDefinition Width="1.2*" />
                                            <ColumnDefinition Width="0.7*" />
                                            <ColumnDefinition Width="0.9*" />
                                            <ColumnDefinition Width="1.1*" />
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Style="{StaticResource LabelTextStyle}" Text="프로그램" />
                                        <TextBlock Grid.Column="1" Style="{StaticResource LabelTextStyle}" Text="Scene" />
                                        <TextBlock Grid.Column="2" Style="{StaticResource LabelTextStyle}" Text="일치율" />
                                        <TextBlock Grid.Column="3" Style="{StaticResource LabelTextStyle}" Text="중요도" />
                                        <TextBlock Grid.Column="4" Style="{StaticResource LabelTextStyle}" Text="판정" />
                                    </Grid>
                                </Border>
                                <ListView
                                    ItemsSource="{x:Bind ViewModel.InspectionQueue, Mode=OneWay}"
                                    SelectionMode="None">
                                    <ListView.ItemTemplate>
                                        <DataTemplate x:DataType="vm:InspectionQueueItemViewModel">
                                            <Border Padding="10,8">
                                                <Grid ColumnSpacing="10">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="1.1*" />
                                                        <ColumnDefinition Width="1.2*" />
                                                        <ColumnDefinition Width="0.7*" />
                                                        <ColumnDefinition Width="0.9*" />
                                                        <ColumnDefinition Width="1.1*" />
                                                    </Grid.ColumnDefinitions>
                                                    <TextBlock
                                                        Style="{StaticResource BodyTextStyle}"
                                                        Text="{x:Bind ProgramTitle}" />
                                                    <TextBlock
                                                        Grid.Column="1"
                                                        Style="{StaticResource MonoTextStyle}"
                                                        Text="{x:Bind SceneName}" />
                                                    <TextBlock
                                                        Grid.Column="2"
                                                        FontFamily="Cascadia Mono"
                                                        Foreground="{StaticResource TextPrimaryBrush}"
                                                        Text="{x:Bind MatchRate}" />
                                                    <Border
                                                        Grid.Column="3"
                                                        Padding="8,3"
                                                        HorizontalAlignment="Left"
                                                        Background="{x:Bind SeverityBrush}"
                                                        CornerRadius="8">
                                                        <TextBlock
                                                            FontFamily="Bahnschrift SemiBold"
                                                            FontSize="12"
                                                            Foreground="#071013"
                                                            Text="{x:Bind Severity}" />
                                                    </Border>
                                                    <TextBlock
                                                        Grid.Column="4"
                                                        Style="{StaticResource BodyTextStyle}"
                                                        Text="{x:Bind Decision}" />
                                                </Grid>
                                            </Border>
                                        </DataTemplate>
                                    </ListView.ItemTemplate>
                                </ListView>
                            </StackPanel>
                        </Border>

                        <Border
                            Grid.Row="1"
                            Grid.Column="2"
                            Padding="16"
                            Background="{StaticResource PanelBrush}"
                            BorderBrush="{StaticResource PanelStrokeBrush}"
                            BorderThickness="1"
                            CornerRadius="8">
                            <StackPanel Spacing="14">
                                <TextBlock Style="{StaticResource SectionTitleTextStyle}" Text="Scene 데이터 API 샘플" />
                                <Border
                                    Padding="14"
                                    Background="#101419"
                                    BorderBrush="{StaticResource PanelStrokeBrush}"
                                    BorderThickness="1"
                                    CornerRadius="8">
                                    <StackPanel Spacing="8">
                                        <TextBlock
                                            Style="{StaticResource LabelTextStyle}"
                                            Text="{x:Bind ViewModel.SceneSnapshotLabel, Mode=OneWay}" />
                                        <TextBlock
                                            FontFamily="Cascadia Mono"
                                            FontSize="13"
                                            Foreground="{StaticResource AccentCyanBrush}"
                                            Text="{x:Bind ViewModel.SceneSnapshotText, Mode=OneWay}"
                                            TextWrapping="WrapWholeWords" />
                                    </StackPanel>
                                </Border>
                                <StackPanel Spacing="6">
                                    <TextBlock Style="{StaticResource LabelTextStyle}" Text="LLM 검수 정책" />
                                    <TextBlock
                                        FontFamily="Bahnschrift SemiBold"
                                        FontSize="18"
                                        Foreground="{StaticResource TextPrimaryBrush}"
                                        Text="{x:Bind ViewModel.LlmPolicyText, Mode=OneWay}" />
                                    <TextBlock
                                        Style="{StaticResource BodyTextStyle}"
                                        Text="{x:Bind ViewModel.LlmPolicyDetail, Mode=OneWay}" />
                                </StackPanel>
                            </StackPanel>
                        </Border>
                    </Grid>
                </Grid>
            </ScrollViewer>
        </NavigationView>

        <Grid
            x:Name="LoginScreen"
            Canvas.ZIndex="20"
            Visibility="{x:Bind ViewModel.LoginScreenVisibility, Mode=OneWay}">
            <Border RenderTransformOrigin="0.5,0.5">
                <Border.RenderTransform>
                    <ScaleTransform x:Name="LoginBackgroundScale" ScaleX="1.07" ScaleY="1.07" />
                </Border.RenderTransform>
                <Border.Background>
                    <ImageBrush
                        ImageSource="ms-appx:///Assets/TornadoAceLoginHero.png"
                        Stretch="UniformToFill" />
                </Border.Background>
            </Border>

            <Rectangle>
                <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                        <GradientStop Color="#E6090B11" Offset="0" />
                        <GradientStop Color="#B3141020" Offset="0.48" />
                        <GradientStop Color="#D70F1014" Offset="1" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
            <Rectangle>
                <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                        <GradientStop Color="#33000000" Offset="0" />
                        <GradientStop Color="#66000000" Offset="1" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>

            <Grid
                Width="1120"
                MaxWidth="1120"
                Margin="42"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                ColumnSpacing="64">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="386" />
                </Grid.ColumnDefinitions>

                <StackPanel
                    MaxWidth="620"
                    Spacing="16"
                    VerticalAlignment="Bottom">
                    <TextBlock
                        FontFamily="Bahnschrift SemiBold"
                        FontSize="13"
                        Foreground="#D7D0B7FF"
                        Text="CJ ONSTYLE" />
                    <TextBlock
                        FontFamily="Bahnschrift SemiBold"
                        FontSize="58"
                        Foreground="White"
                        LineHeight="64"
                        Text="TornadoAce"
                        TextWrapping="WrapWholeWords" />
                    <TextBlock
                        MaxWidth="540"
                        FontFamily="Bahnschrift SemiBold"
                        FontSize="20"
                        Foreground="#C8FF17"
                        Text="CG Automation Console"
                        TextWrapping="WrapWholeWords" />
                </StackPanel>

                <Border
                    Grid.Column="1"
                    Padding="24"
                    Background="#F5FFFFFF"
                    BorderBrush="#33FFFFFF"
                    BorderThickness="1"
                    CornerRadius="8">
                    <StackPanel Spacing="14">
                        <TextBlock
                            FontFamily="Bahnschrift"
                            FontSize="12"
                            Foreground="#7B2CBF"
                            Text="CJ ONSTYLE" />
                        <TextBlock
                            FontFamily="Bahnschrift SemiBold"
                            FontSize="24"
                            Foreground="#15101A"
                            Text="TornadoAce" />

                        <StackPanel Spacing="6">
                            <TextBlock
                                FontFamily="Bahnschrift SemiBold"
                                FontSize="12"
                                Foreground="#62606A"
                                Text="아이디" />
                            <TextBox
                                x:Name="OperatorNameTextBox"
                                MinHeight="42"
                                PlaceholderText="operator"
                                Text="{x:Bind ViewModel.LoginOperatorName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>

                        <StackPanel Spacing="6">
                            <TextBlock
                                FontFamily="Bahnschrift SemiBold"
                                FontSize="12"
                                Foreground="#62606A"
                                Text="패스워드" />
                            <PasswordBox
                                x:Name="OperatorPasswordBox"
                                MinHeight="42"
                                PlaceholderText="access code" />
                        </StackPanel>

                        <Button
                            MinHeight="44"
                            Margin="0,4,0,0"
                            HorizontalAlignment="Stretch"
                            Background="#341069"
                            Click="LoginButton_Click"
                            CornerRadius="5"
                            Foreground="White">
                            <StackPanel
                                HorizontalAlignment="Center"
                                Orientation="Horizontal"
                                Spacing="8">
                                <SymbolIcon Symbol="Play" />
                                <TextBlock Text="Login" />
                            </StackPanel>
                        </Button>

                    </StackPanel>
                </Border>
            </Grid>
        </Grid>

        <Grid
            Canvas.ZIndex="30"
            Background="#99090B11"
            Visibility="{x:Bind ViewModel.LaunchScreenVisibility, Mode=OneWay}">
            <Border
                Width="420"
                Padding="22"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                Background="#F7FFFFFF"
                BorderBrush="#E5FFFFFF"
                BorderThickness="1"
                CornerRadius="8">
                <StackPanel Spacing="12">
                    <TextBlock
                        FontFamily="Bahnschrift"
                        FontSize="12"
                        Foreground="#7B2CBF"
                        Text="TORNADOACE" />
                    <TextBlock
                        FontFamily="Bahnschrift SemiBold"
                        FontSize="22"
                        Foreground="#15101A"
                        Text="CJ OnStyle CG Automation" />
                    <TextBlock
                        FontFamily="Bahnschrift"
                        FontSize="14"
                        Foreground="#62606A"
                        Text="{x:Bind ViewModel.LaunchMessage, Mode=OneWay}"
                        TextWrapping="WrapWholeWords" />
                    <ProgressBar
                        Height="5"
                        IsIndeterminate="True"
                        Foreground="#C8FF17" />
                </StackPanel>
            </Border>
        </Grid>
        </Grid>
    </Page.Content>
</Page>
