<Page x:Class="SkyTeam.LogInPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
      Title="LogInPage"
      KeyboardNavigation.DirectionalNavigation="Cycle"
      Loaded="Page_Loaded">

    <Grid Margin="40,20">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,50">
            <iconPacks:PackIconMaterial Kind="Account" Width="36" Height="36" Margin="0,0,15,0"/>
            <StackPanel>
                <TextBlock Text="Sky Team" FontSize="36" FontWeight="Bold"/>
                <TextBlock Text="Melden Sie sich an um zu starten" FontSize="14" Foreground="#666" Margin="0,5,0,0"/>
            </StackPanel>
        </StackPanel>

        <Border Grid.Row="1" Background="White" CornerRadius="16" Padding="50" BorderBrush="#E0E0E0" BorderThickness="1" VerticalAlignment="Center" HorizontalAlignment="Center">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="24"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="40"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>

                <Label Content="Email (Benutzername):" Grid.Row="0" FontWeight="SemiBold"/>
                <TextBox x:Name="BenutzernameTextBox" Grid.Row="1" Height="45" FontSize="14" VerticalContentAlignment="Center" TabIndex="0" PreviewKeyDown="BenutzernameTextBox_PreviewKeyDown"/>

                <Label Content="Passwort:" Grid.Row="3" FontWeight="SemiBold"/>
                <PasswordBox x:Name="PasswortTextBox" Grid.Row="4" Height="45" FontSize="14" VerticalContentAlignment="Center" TabIndex="1"/>

                <StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,20,0,0">
                    <Button Content="Login" Width="140" Height="48" Margin="0,0,20,0" Background="#FF1E88E5" Foreground="White" FontWeight="Bold" Click="LogInButton_Click" TabIndex="2" IsDefault="True"/>
                    <Button Content="Registrieren" Width="140" Height="48" Background="Transparent" BorderBrush="#DDD" Foreground="#666" Click="anmeldungsButton_Click" TabIndex="3"/>
                </StackPanel>

                <TextBlock Grid.Row="7" HorizontalAlignment="Center" Margin="0,20,0,0">
                    <Run Text="Sind Sie Admin?" Foreground="#666"/> 
                    <Hyperlink Click="AdminLink_Click" Foreground="#1E88E5" TextDecorations="None" FontWeight="Bold">Bitte hier klicken</Hyperlink>
                </TextBlock>
            </Grid>
        </Border>
    </Grid>
</Page>