<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.effect.DropShadow?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>

<StackPane style="-fx-background-color: #2C3E50;"
           xmlns="http://javafx.com/javafx/17"
           xmlns:fx="http://javafx.com/fxml/1"
           fx:controller="org.example.petshopdesktop.controllers.LoginController">
   <children>
      <VBox alignment="TOP_CENTER" fillWidth="true" maxWidth="360.0" prefWidth="360.0" spacing="14.0"
            style="-fx-background-color: rgba(33, 52, 71, 0.72); -fx-background-radius: 24; -fx-border-color: rgba(255,255,255,0.06); -fx-border-radius: 24;">
         <padding>
            <Insets bottom="34.0" left="34.0" right="34.0" top="34.0" />
         </padding>
         <children>
            <StackPane fx:id="logoContainer" maxHeight="176.0" maxWidth="176.0" minHeight="176.0" minWidth="176.0" prefHeight="176.0" prefWidth="176.0">
               <effect>
                  <DropShadow blurType="GAUSSIAN" color="0x0f172838" height="18.0" offsetY="6.0" radius="9.0" spread="0.16" width="18.0" />
               </effect>
               <VBox.margin>
                  <Insets bottom="14.0" />
               </VBox.margin>
            </StackPane>

            <Label maxWidth="Infinity" text="Username" textFill="#d7dee6">
               <font>
                  <Font name="System Bold" size="13.0" />
               </font>
            </Label>
            <TextField fx:id="txtUsername" maxWidth="Infinity" prefWidth="292.0" promptText="Enter username"
                       style="-fx-background-color: #40556c; -fx-text-fill: white; -fx-prompt-text-fill: #91a4b7; -fx-background-radius: 10; -fx-border-width: 0;">
               <padding>
                  <Insets bottom="11.0" left="14.0" right="14.0" top="11.0" />
               </padding>
               <font>
                  <Font size="14.0" />
               </font>
            </TextField>

            <Label maxWidth="Infinity" text="Password" textFill="#d7dee6">
               <font>
                  <Font name="System Bold" size="13.0" />
               </font>
               <padding>
                  <Insets top="2.0" />
               </padding>
            </Label>
            <PasswordField fx:id="txtPassword" maxWidth="Infinity" prefWidth="292.0" promptText="Enter password"
                           style="-fx-background-color: #40556c; -fx-text-fill: white; -fx-prompt-text-fill: #91a4b7; -fx-background-radius: 10; -fx-border-width: 0;">
               <padding>
                  <Insets bottom="11.0" left="14.0" right="14.0" top="11.0" />
               </padding>
               <font>
                  <Font size="14.0" />
               </font>
            </PasswordField>

            <Label fx:id="lblError" maxWidth="Infinity" text="" textFill="#ff8a8a" wrapText="true">
               <font>
                  <Font size="13.0" />
               </font>
            </Label>

            <Button fx:id="btnLogin" defaultButton="true" maxWidth="Infinity" mnemonicParsing="false" onAction="#btnLoginClicked"
                    prefWidth="292.0"
                    style="-fx-background-color: #FF6B6B; -fx-background-radius: 10; -fx-cursor: hand;"
                    text="Login" textFill="WHITE">
               <font>
                  <Font name="System Bold" size="15.0" />
               </font>
               <padding>
                  <Insets bottom="12.0" left="12.0" right="12.0" top="12.0" />
               </padding>
               <VBox.margin>
                  <Insets top="8.0" />
               </VBox.margin>
            </Button>
         </children>
      </VBox>
   </children>
   <padding>
      <Insets bottom="24.0" left="24.0" right="24.0" top="24.0" />
   </padding>
</StackPane>
