<Window x:Class="ITNexusAgent.UI.DashboardWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="IT Nexus Agent"
        Icon="pack://application:,,,/icon.ico"
        Width="560" Height="640"
        WindowStartupLocation="CenterScreen"
        ResizeMode="CanResize"
        StateChanged="Window_StateChanged"
        Background="Transparent"
        FontFamily="Segoe UI"
        WindowStyle="None"
        AllowsTransparency="True"
        MinWidth="480" MinHeight="540">

    <Window.Resources>
        <Style x:Key="Card" TargetType="Border">
            <Setter Property="Background" Value="#1C1C1F"/>
            <Setter Property="CornerRadius" Value="12"/>
            <Setter Property="Padding" Value="16,14"/>
            <Setter Property="Margin" Value="0,0,0,10"/>
        </Style>

        <Style x:Key="BtnAction" TargetType="Button">
            <Setter Property="Background" Value="#2A2A2E"/>
            <Setter Property="Foreground" Value="#E4E4E7"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="FontFamily" Value="Segoe UI"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border x:Name="Bd" Background="{TemplateBinding Background}" CornerRadius="9"
                                BorderThickness="1" BorderBrush="#333337">
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="Bd" Property="Background" Value="#35353A"/>
                                <Setter TargetName="Bd" Property="BorderBrush" Value="#4A4A50"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter TargetName="Bd" Property="Background" Value="#1A1A1D"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="BtnPrimary" TargetType="Button" BasedOn="{StaticResource BtnAction}">
            <Setter Property="Background" Value="#1D4ED8"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border x:Name="Bd" Background="{TemplateBinding Background}" CornerRadius="9" BorderThickness="0">
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="Bd" Property="Background" Value="#2563EB"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter TargetName="Bd" Property="Background" Value="#1E40AF"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="BtnWarn" TargetType="Button" BasedOn="{StaticResource BtnAction}">
            <Setter Property="Background" Value="#27180A"/>
            <Setter Property="Foreground" Value="#F97316"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border x:Name="Bd" Background="{TemplateBinding Background}" CornerRadius="9"
                                BorderThickness="1" BorderBrush="#3D2510">
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="Bd" Property="Background" Value="#352010"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="BtnGhost" TargetType="Button">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Foreground" Value="#52525B"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="FontSize" Value="11"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <TextBlock x:Name="T" Text="{TemplateBinding Content}"
                                   Foreground="{TemplateBinding Foreground}"
                                   FontSize="{TemplateBinding FontSize}"
                                   HorizontalAlignment="Center"/>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="T" Property="Foreground" Value="#71717A"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="BtnAdminAction" TargetType="Button" BasedOn="{StaticResource BtnAction}">
            <Setter Property="FontSize" Value="11"/>
        </Style>
    </Window.Resources>

    <!-- Outer container -->
    <Grid>
    <Border x:Name="OuterBorder" Background="#111113" CornerRadius="14" BorderBrush="#2A2A2E" BorderThickness="1"
            Margin="16">
        <Border.Effect>
            <DropShadowEffect Color="Black" Opacity="0.4" BlurRadius="20" ShadowDepth="0"/>
        </Border.Effect>

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

            <!-- ═══ TITLEBAR (draggable) ═══ -->
            <Border x:Name="TitleBarBorder" Grid.Row="0" Background="#18181B" CornerRadius="14,14,0,0"
                    MouseLeftButtonDown="TitleBar_MouseDown">
                <Grid Margin="18,14,18,14">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>

                    <StackPanel VerticalAlignment="Center">
                        <TextBlock Text="IT Nexus Agent" FontSize="15" FontWeight="Bold"
                                   Foreground="#FAFAFA"/>
                        <TextBlock x:Name="HostnameLabel" FontSize="11" Foreground="#52525B"
                                   Margin="0,2,0,0"/>
                    </StackPanel>

                    <StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
                        <!-- Status -->
                        <StackPanel Orientation="Horizontal" Margin="0,0,20,0" VerticalAlignment="Center">
                            <Ellipse x:Name="StatusDot" Width="8" Height="8" Margin="0,0,7,0" VerticalAlignment="Center"/>
                            <TextBlock x:Name="StatusLabel" FontSize="11" FontWeight="SemiBold" VerticalAlignment="Center"/>
                        </StackPanel>
                        <!-- Minimieren -->
                        <Button Width="32" Height="32" Click="Minimize_Click" ToolTip="Minimieren">
                            <Button.Template>
                                <ControlTemplate TargetType="Button">
                                    <Border x:Name="Bd" Background="Transparent" CornerRadius="6">
                                        <TextBlock Text="&#xE921;" FontFamily="Segoe MDL2 Assets"
                                                   FontSize="9" Foreground="#52525B"
                                                   HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    </Border>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter TargetName="Bd" Property="Background" Value="#2A2A2E"/>
                                            <Setter Property="Foreground" Value="#A1A1AA"/>
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                        <!-- Maximieren -->
                        <Button Width="32" Height="32" Click="Maximize_Click" ToolTip="Maximieren">
                            <Button.Template>
                                <ControlTemplate TargetType="Button">
                                    <Border x:Name="Bd" Background="Transparent" CornerRadius="6">
                                        <TextBlock x:Name="MaxIcon" Text="&#xE922;" FontFamily="Segoe MDL2 Assets"
                                                   FontSize="9" Foreground="#52525B"
                                                   HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    </Border>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter TargetName="Bd" Property="Background" Value="#2A2A2E"/>
                                            <Setter TargetName="MaxIcon" Property="Foreground" Value="#A1A1AA"/>
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                        <!-- Schließen -->
                        <Button Width="32" Height="32" Click="Close_Click" ToolTip="Schließen">
                            <Button.Template>
                                <ControlTemplate TargetType="Button">
                                    <Border x:Name="Bd" Background="Transparent" CornerRadius="6">
                                        <TextBlock Text="&#xE711;" FontFamily="Segoe MDL2 Assets"
                                                   FontSize="9" Foreground="#52525B"
                                                   HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    </Border>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter TargetName="Bd" Property="Background" Value="#C0392B"/>
                                            <Setter Property="Foreground" Value="White"/>
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                    </StackPanel>
                </Grid>
            </Border>

            <!-- ═══ CONTENT ═══ -->
            <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Hidden"
                          Background="#111113">
                <StackPanel Margin="14,12,14,4">

                    <!-- Metric Cards -->
                    <Grid Margin="0,0,0,10">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="8"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="8"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>

                        <Border Grid.Column="0" Background="#1C1C1F" CornerRadius="12" Padding="14,12">
                            <StackPanel>
                                <TextBlock Text="CPU" FontSize="10" Foreground="#52525B"
                                           FontWeight="SemiBold" Margin="0,0,0,6"/>
                                <TextBlock x:Name="CpuLabel" FontSize="24" FontWeight="Bold"
                                           Foreground="#FAFAFA" Margin="0,0,0,8"/>
                                <ProgressBar x:Name="CpuBar" Height="3" BorderThickness="0"
                                             Background="#2A2A2E" Minimum="0" Maximum="100"/>
                            </StackPanel>
                        </Border>

                        <Border Grid.Column="2" Background="#1C1C1F" CornerRadius="12" Padding="14,12">
                            <StackPanel>
                                <TextBlock Text="RAM" FontSize="10" Foreground="#52525B"
                                           FontWeight="SemiBold" Margin="0,0,0,6"/>
                                <TextBlock x:Name="RamLabel" FontSize="14" FontWeight="Bold"
                                           Foreground="#FAFAFA" Margin="0,0,0,8" TextWrapping="Wrap"/>
                                <ProgressBar x:Name="RamBar" Height="3" BorderThickness="0"
                                             Background="#2A2A2E" Minimum="0" Maximum="100"/>
                            </StackPanel>
                        </Border>

                        <Border Grid.Column="4" Background="#1C1C1F" CornerRadius="12" Padding="14,12">
                            <StackPanel>
                                <TextBlock Text="DISK" FontSize="10" Foreground="#52525B"
                                           FontWeight="SemiBold" Margin="0,0,0,6"/>
                                <TextBlock x:Name="DiskLabel" FontSize="14" FontWeight="Bold"
                                           Foreground="#FAFAFA" Margin="0,0,0,8" TextWrapping="Wrap"/>
                                <ProgressBar x:Name="DiskBar" Height="3" BorderThickness="0"
                                             Background="#2A2A2E" Minimum="0" Maximum="100"/>
                            </StackPanel>
                        </Border>
                    </Grid>

                    <!-- Status Card -->
                    <Border Background="#1C1C1F" CornerRadius="12" Padding="16,14" Margin="0,0,0,10">
                        <StackPanel>
                            <Grid Margin="0,0,0,10">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="28"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Text="&#xE72E;" FontFamily="Segoe MDL2 Assets"
                                           FontSize="13" Foreground="#3F3F46" VerticalAlignment="Center"/>
                                <TextBlock Grid.Column="1" Text="BitLocker" FontSize="12"
                                           Foreground="#A1A1AA" VerticalAlignment="Center"/>
                                <TextBlock x:Name="BitlockerLabel" Grid.Column="2" FontSize="12"
                                           FontWeight="SemiBold" VerticalAlignment="Center"/>
                            </Grid>

                            <Rectangle Height="1" Fill="#27272A" Margin="0,0,0,10"/>

                            <Grid Margin="0,0,0,10">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="28"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Text="&#xEA18;" FontFamily="Segoe MDL2 Assets"
                                           FontSize="13" Foreground="#3F3F46" VerticalAlignment="Center"/>
                                <TextBlock Grid.Column="1" Text="Microsoft Defender" FontSize="12"
                                           Foreground="#A1A1AA" VerticalAlignment="Center"/>
                                <TextBlock x:Name="DefenderLabel" Grid.Column="2" FontSize="12"
                                           FontWeight="SemiBold" VerticalAlignment="Center"/>
                            </Grid>

                            <Rectangle Height="1" Fill="#27272A" Margin="0,0,0,10"/>

                            <Grid Margin="0,0,0,10">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="28"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Text="&#xE895;" FontFamily="Segoe MDL2 Assets"
                                           FontSize="13" Foreground="#3F3F46" VerticalAlignment="Center"/>
                                <TextBlock Grid.Column="1" Text="Windows Updates" FontSize="12"
                                           Foreground="#A1A1AA" VerticalAlignment="Center"/>
                                <TextBlock x:Name="UpdatesLabel" Grid.Column="2" FontSize="12"
                                           FontWeight="SemiBold" VerticalAlignment="Center"/>
                            </Grid>

                            <Rectangle Height="1" Fill="#27272A" Margin="0,0,0,10"/>

                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="28"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Text="&#xE9D9;" FontFamily="Segoe MDL2 Assets"
                                           FontSize="13" Foreground="#3F3F46" VerticalAlignment="Center"/>
                                <TextBlock Grid.Column="1" Text="Seriennummer" FontSize="12"
                                           Foreground="#A1A1AA" VerticalAlignment="Center"/>
                                <TextBlock x:Name="SerialLabel" Grid.Column="2" FontSize="11"
                                           Foreground="#52525B" VerticalAlignment="Center"
                                           FontFamily="Consolas"/>
                            </Grid>
                        </StackPanel>
                    </Border>

                    <!-- Installierte Software -->
                    <Border Background="#1C1C1F" CornerRadius="12" Padding="16,14" Margin="0,0,0,10">
                        <StackPanel>
                            <Grid Margin="0,0,0,10">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Text="INSTALLIERTE SOFTWARE" FontSize="10" FontWeight="SemiBold"
                                           Foreground="#52525B" VerticalAlignment="Center"/>
                                <TextBlock x:Name="SoftwareCountLabel" Grid.Column="1" FontSize="10"
                                           Foreground="#3F3F46" VerticalAlignment="Center"/>
                            </Grid>
                            <Border Background="#27272A" CornerRadius="8" BorderBrush="#3F3F46"
                                    BorderThickness="1" Padding="10,0" Margin="0,0,0,8">
                                <TextBox x:Name="SoftwareSearch" Background="Transparent"
                                         Foreground="#71717A" BorderThickness="0" FontSize="12"
                                         Height="32" VerticalContentAlignment="Center"
                                         CaretBrush="White"
                                         TextChanged="SoftwareSearch_TextChanged"/>
                            </Border>
                            <ListBox x:Name="SoftwareList" MaxHeight="200" Background="Transparent"
                                     BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                     ScrollViewer.VerticalScrollBarVisibility="Auto">
                                <ListBox.ItemContainerStyle>
                                    <Style TargetType="ListBoxItem">
                                        <Setter Property="Foreground" Value="#A1A1AA"/>
                                        <Setter Property="FontSize" Value="11"/>
                                        <Setter Property="Padding" Value="4,3"/>
                                        <Setter Property="Background" Value="Transparent"/>
                                        <Setter Property="BorderThickness" Value="0"/>
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="ListBoxItem">
                                                    <Border x:Name="Bd" Background="{TemplateBinding Background}"
                                                            CornerRadius="4" Padding="6,3">
                                                        <TextBlock Text="{TemplateBinding Content}"
                                                                   Foreground="{TemplateBinding Foreground}"
                                                                   FontSize="11" TextTrimming="CharacterEllipsis"/>
                                                    </Border>
                                                    <ControlTemplate.Triggers>
                                                        <Trigger Property="IsMouseOver" Value="True">
                                                            <Setter TargetName="Bd" Property="Background" Value="#27272A"/>
                                                        </Trigger>
                                                        <Trigger Property="IsSelected" Value="True">
                                                            <Setter TargetName="Bd" Property="Background" Value="#1D4ED820"/>
                                                            <Setter Property="Foreground" Value="#FAFAFA"/>
                                                        </Trigger>
                                                    </ControlTemplate.Triggers>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </ListBox.ItemContainerStyle>
                            </ListBox>
                        </StackPanel>
                    </Border>

                    <!-- Letzter Check-in -->
                    <TextBlock x:Name="LastCheckinLabel" FontSize="10" Foreground="#3F3F46"
                               HorizontalAlignment="Center" Margin="0,0,0,10"/>

                    <!-- Action Buttons -->
                    <Button x:Name="WebButton" Height="40" Margin="0,0,0,8"
                            Content="IT Nexus Web öffnen"
                            Click="WebButton_Click" Style="{StaticResource BtnPrimary}"
                            FontSize="12" FontWeight="SemiBold"/>

                    <Grid Margin="0,0,0,8">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="8"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Button Grid.Column="0" Height="38"
                                Content="Nachricht senden"
                                Click="MessageButton_Click"
                                Style="{StaticResource BtnAction}"
                                FontSize="11"/>
                        <Button Grid.Column="2" Height="38"
                                Content="Neustart anfordern"
                                Click="RebootButton_Click"
                                Style="{StaticResource BtnWarn}"
                                FontSize="11"/>
                    </Grid>

                    <!-- Admin -->
                    <Border Background="#1C1C1F" CornerRadius="12" Padding="14,12" Margin="0,0,0,4">
                        <StackPanel>
                            <Button x:Name="AdminLoginButton" Content="Admin-Modus"
                                    Height="26" Click="AdminLoginButton_Click"
                                    Style="{StaticResource BtnGhost}"/>
                            <StackPanel x:Name="AdminPanel" Visibility="Collapsed" Margin="0,12,0,0">
                                <TextBlock x:Name="AdminUserLabel" FontSize="11" Foreground="#3B82F6"
                                           FontWeight="SemiBold" Margin="0,0,0,10"
                                           HorizontalAlignment="Center"/>
                                <UniformGrid Columns="2" Rows="2">
                                    <Button Content="Sofort Check-in" Height="34" Margin="0,0,4,4"
                                            Click="AdminCheckin_Click" Style="{StaticResource BtnAdminAction}"/>
                                    <Button Content="Updates prüfen" Height="34" Margin="4,0,0,4"
                                            Click="AdminUpdates_Click" Style="{StaticResource BtnAdminAction}"/>
                                    <Button Content="Agent-Log" Height="34" Margin="0,0,4,0"
                                            Click="AdminLog_Click" Style="{StaticResource BtnAdminAction}"/>
                                    <Button Content="Neu starten" Height="34" Margin="4,0,0,0"
                                            Click="AdminRestart_Click" Style="{StaticResource BtnAdminAction}"/>
                                </UniformGrid>
                            </StackPanel>
                        </StackPanel>
                    </Border>

                </StackPanel>
            </ScrollViewer>

            <!-- ═══ FOOTER ═══ -->
            <Border Grid.Row="2" Background="#18181B" CornerRadius="0,0,14,14"
                    Padding="0,10">
                <TextBlock x:Name="VersionLabel" FontSize="10" Foreground="#3F3F46"
                           HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
        </Grid>

    </Border>

    <!-- ═══ ADMIN LOGIN MODAL OVERLAY ═══ -->
    <Border x:Name="AdminOverlay" Visibility="Collapsed"
            Background="#80000000" CornerRadius="14">
            <Border Background="#1C1C1F" CornerRadius="12" Padding="28,24"
                    Width="320" VerticalAlignment="Center" HorizontalAlignment="Center">
                <Border.Effect>
                    <DropShadowEffect Color="Black" Opacity="0.6" BlurRadius="30" ShadowDepth="0"/>
                </Border.Effect>
                <StackPanel>
                    <TextBlock Text="Admin-Anmeldung" FontSize="15" FontWeight="Bold"
                               Foreground="#FAFAFA" Margin="0,0,0,4"/>
                    <TextBlock Text="IT Nexus Zugangsdaten eingeben"
                               FontSize="11" Foreground="#52525B" Margin="0,0,0,20"/>

                    <TextBlock Text="Benutzername" FontSize="11" Foreground="#71717A" Margin="0,0,0,6"/>
                    <Border Background="#27272A" CornerRadius="8" BorderBrush="#3F3F46"
                            BorderThickness="1" Padding="12,0" Margin="0,0,0,12">
                        <TextBox x:Name="AdminUsernameBox" Background="Transparent"
                                 Foreground="#FAFAFA" BorderThickness="0" FontSize="13"
                                 Height="36" VerticalContentAlignment="Center"
                                 CaretBrush="White"/>
                    </Border>

                    <TextBlock Text="Passwort" FontSize="11" Foreground="#71717A" Margin="0,0,0,6"/>
                    <Border Background="#27272A" CornerRadius="8" BorderBrush="#3F3F46"
                            BorderThickness="1" Padding="12,0" Margin="0,0,0,6">
                        <PasswordBox x:Name="AdminPasswordBox" Background="Transparent"
                                     Foreground="#FAFAFA" BorderThickness="0" FontSize="13"
                                     Height="36" VerticalContentAlignment="Center"
                                     KeyDown="AdminPasswordBox_KeyDown"/>
                    </Border>

                    <TextBlock x:Name="AdminErrorLabel" FontSize="11" Foreground="#EF4444"
                               Margin="0,4,0,0" Visibility="Collapsed"/>

                    <Grid Margin="0,20,0,0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="8"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Button Grid.Column="0" Content="Abbrechen" Height="38"
                                Click="AdminCancelModal_Click"
                                Style="{StaticResource BtnAction}" FontSize="12"/>
                        <Button x:Name="AdminLoginBtn" Grid.Column="2" Content="Anmelden" Height="38"
                                Click="AdminLoginModal_Click"
                                Style="{StaticResource BtnPrimary}" FontSize="12" FontWeight="SemiBold"/>
                    </Grid>
                </StackPanel>
            </Border>
        </Border>

    </Grid>
</Window>
