/* =========================================================
   TRAX – Script Information Header (Standard v1.2)
   =========================================================

   File: /TRAX/CSS/login.css
   Type: Page-specific CSS
   Scope: TRAX Login Page
   Status: Active
   Version: 1.2

   ---------------------------------------------------------
   1) Purpose
   ---------------------------------------------------------
   Seitenspezifisches Styling fuer /TRAX/login.php.

   Diese Datei definiert das Layout der TRAX-Loginseite,
   inklusive Wrapper, Logo, Formularfeldern, Buttons,
   Footer-Links und Fehlerzustaenden fuer ungueltige Eingaben.

   ---------------------------------------------------------
   2) Main Functions
   ---------------------------------------------------------
   - Zentriert die Login-Maske auf Desktop vertikal und horizontal
   - Definiert das dunkle TRAX-Auth-Layout
   - Formatiert das TRAX-Logo im Loginbereich
   - Stylt Eingabefelder fuer Benutzername und Passwort
   - Stylt den Login-Button inklusive Hover-Zustand
   - Formatiert Footer-Links fuer Registrierung und Passwort-Reset
   - Markiert ungueltige Eingabefelder ueber .is-invalid
   - Optimiert die Smartphone-Darstellung mit 100svh

   ---------------------------------------------------------
   3) Related Files
   ---------------------------------------------------------
   - /TRAX/login.php
   - /TRAX/CSS/notifications.css
   - /TRAX/JS/notifications.js
   - /TRAX/includes/notification.php

   ---------------------------------------------------------
   4) Notes
   ---------------------------------------------------------
   - Desktop-Format bleibt identisch zur bisherigen TRAX-Basis.
   - Mobile-Format wurde an die finale DOMERA-Mobile-Ansicht
     angepasst.
   - Keine globale box-sizing-Regel auf Desktop, damit die reale
     Wrapper-Breite inklusive Padding dem bestehenden TRAX-Format
     entspricht.
   - Mobile-Anpassungen greifen erst ab max-width: 760px.
   - Notification-Design liegt separat in notifications.css.

   ---------------------------------------------------------
   5) Author / Version
   ---------------------------------------------------------

   Author: Manuel Blenk
   Project: TRAX

   Version: 1.2
   Created: 2026
   Last Update: 2026-06-14

========================================================= */


/* =========================================================
   1) Base Layout
========================================================= */

body {
    font-family: 'Arial', sans-serif;
    background-color: #0b1a20;
    color: #ecf0f1;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
}


/* =========================================================
   2) Login Wrapper
========================================================= */

.wrapper {
    background-color: #1b2a38;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 100%;
    text-align: center;
    border: 1px solid #0b1a20;
}


/* =========================================================
   3) Logo
========================================================= */

img.logo {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-bottom: 20px;
    user-select: none;
    pointer-events: none;
    border-radius: 50%;
    border: 5px solid #1b2a38;
}


/* =========================================================
   4) Form Elements
========================================================= */

.form-group {
    margin-bottom: 1em;
    text-align: left;
}

label {
    display: block;
    margin-bottom: .5em;
    color: #ecf0f1;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 8px;
    margin-top: 0;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    box-sizing: border-box;
    background-color: #ffffff;
    color: #000000;
    transition: all 0.2s ease-in-out;
}


/* =========================================================
   5) Button
========================================================= */

.btn {
    background-color: #1b6f91;
    color: #ecf0f1;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    transition: background-color 0.2s ease-in-out;
}

.btn:hover {
    background-color: #155d74;
}


/* =========================================================
   6) Footer Links
========================================================= */

.form-footer {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.95rem;
}

a {
    color: #ecf0f1;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* =========================================================
   7) Invalid Input State
========================================================= */

input.is-invalid {
    border: 2px solid #e74c3c !important;
    background-color: #fff0f0 !important;
    outline: none;
    box-shadow: 0 0 4px rgba(231, 76, 60, 0.4);
    transition: all 0.2s ease-in-out;
}

input.is-invalid:focus {
    border-color: #c0392b !important;
    box-shadow: 0 0 6px rgba(192, 57, 43, 0.6);
}


/* =========================================================
   8) Mobile Layout
   Nur Smartphone-Anpassung.
   Desktop bleibt TRAX-identisch.
========================================================= */

@media (max-width: 760px) {
    html,
    body {
        min-height: 100svh;
    }

    body {
        justify-content: flex-start;
        align-items: center;
        padding: clamp(84px, 12svh, 120px) 16px 36px;
    }

    .wrapper {
        box-sizing: border-box;
        width: 100%;
        max-width: 320px;
        padding: 20px 22px 22px;
        border-radius: 9px;
    }

    img.logo {
        max-width: 210px;
        margin-bottom: 16px;
        border-width: 4px;
    }

    .wrapper p {
        font-size: 13px;
        margin-top: 0;
        margin-bottom: 0.9em;
    }

    .form-group {
        margin-bottom: 0.75em;
    }

    label {
        font-size: 13px;
        margin-bottom: 0.4em;
    }

    input[type="text"],
    input[type="password"] {
        padding: 7px 8px;
        margin-bottom: 7px;
        font-size: 16px;
        border-radius: 5px;
    }

    .btn {
        padding: 9px 15px;
        font-size: 13px;
        border-radius: 5px;
    }

    .form-footer {
        gap: 10px;
        margin-top: 2px;
        font-size: 13px;
    }
}


/* =========================================================
   9) Very Small Mobile
========================================================= */

@media (max-width: 380px) {
    body {
        padding-top: clamp(70px, 10svh, 100px);
        padding-left: 14px;
        padding-right: 14px;
    }

    .wrapper {
        max-width: 300px;
        padding: 18px 20px 20px;
    }

    img.logo {
        max-width: 190px;
        margin-bottom: 14px;
    }

    .wrapper p {
        font-size: 12px;
        margin-bottom: 0.8em;
    }

    .form-footer {
        flex-direction: column;
        gap: 7px;
    }
}


/* =========================================================
   10) Fallback fuer Browser ohne svh-Unterstuetzung
========================================================= */

@supports not (height: 100svh) {
    @media (max-width: 760px) {
        html,
        body {
            min-height: 100vh;
        }

        body {
            padding-top: 84px;
        }
    }
}