/* assets/css/login.css
   Geizhals-inspiriertes, cleanes Login-Layout
*/

:root {
    /* Dunkelblauer Background, helle Cards, blaue Akzente */
    --gh-bg: #151923;
    --gh-card: #1f2937;
    --gh-text: #ffffff;
    --gh-muted: #ffffff;
    --gh-border: #5e6075;

    --gh-primary: #274a97;
    --gh-primary-2: #1d4ed8;
    --gh-link: #3c5fb6;

    --gh-danger: #d92d20;
    --gh-shadow: 0 14px 34px rgba(2, 6, 23, 0.35);
    --gh-radius: 16px;
    --gh-focus: 0 0 0 4px rgba(37, 99, 235, 0.28);
}

/* Wir stylen nur innerhalb des Login-Bereichs, damit global nichts kaputtgeht */
.auth {
    display: grid;
    place-items: center;
    min-height: 81.5svh;
    padding: 34px 18px 60px;
    background: var(--gh-bg);
}

.auth__grid {
    display: grid;
    grid-template-columns: 1fr; /* statt 1.06fr 0.94fr */
    justify-items: center;
    gap: 22px;
    min-width: 1080px;
    max-width: 1080px;
    margin: 0 auto;
    align-items: center; /* optional, aber passend zur Zentrierung */
}

/*
 * Layout-Varianten für Seiten, die mehrere .auth__card haben (z.B. account.php)
 * Nutzung:
 *  - nebeneinander: <section class="auth__grid auth__card__side">
 *  - untereinander: <section class="auth__grid auth__card__stack">
 */
.auth__grid.auth__card__side {
    grid-template-columns: max-content 1fr;
    align-items: start;
    justify-items: stretch;
}

.auth__grid.auth__card__side .auth__card {
    width: 100%;
}

/* Bild-Card in Side-Ansicht: Card wird so groß wie das Bild (inkl. Padding), Bild bleibt IN der Card */
.auth__grid.auth__card__side .auth__card.auth__card__side__picture {
    display: inline-grid;
    width: max-content;
    justify-self: center; /* Card mittig in der linken Spalte */
    padding: 12px; /* Abstand zwischen Rahmen und Bild */
    overflow: hidden; /* Bild darf nicht über Radius/Rahmen hinauslaufen */
    place-items: center; /* Bild mittig in der Card */
}

/* Der normale auth__header ist ein Grid (Logo+Text). In der Bild-Card wollen wir nur "zentriert" */
.auth__grid.auth__card__side .auth__card.auth__card__side__picture .auth__header{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
}

.auth__grid.auth__card__side .auth__card.auth__card__side__picture img {
    display: block; /* entfernt Inline-Gap unter Bildern */
    max-width: none; /* Card richtet sich an echter Bildbreite aus */
    height: auto;
    /* runde Ecken kommen vom Container (overflow:hidden) */
}

.auth__grid.auth__card__stack {
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
}

.auth__card,
.auth__sideCard {
    width: min(520px, 100%);
    background: var(--gh-card);
    /* border: 1px solid var(--gh-border); */
    border-radius: var(--gh-radius);
    box-shadow: var(--gh-shadow);
}

.auth__card {
    padding: 22px;
}

.auth__header {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    row-gap: 2px;
    align-items: center;
    margin-bottom: 12px;
}

.auth__logo {
    display: block;
    width: 140px;
    height: auto;
    grid-row: span 2;
}

.auth__title {
    margin: 0;
    font-size: 1.55rem;
    letter-spacing: 0.2px;
    color: var(--gh-text);
}

.auth__subtitle {
    margin: 0;
    color: var(--gh-muted);
    font-size: 0.98rem;
    line-height: 1.4;
}

.auth__alert__error {
    margin: 12px 0 14px;
    color: #ffffff;
    background: var(--gh-danger);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 8px 18px rgba(217, 45, 32, 0.18);
}

.auth__alert__sucess {
    margin: 12px 0 14px;
    color: #ffffff;
    background: #558346;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 8px 18px rgba(72, 142, 62, 0.18);
}

.auth__form {
    margin-top: 6px;
}

.auth__field {
    margin-top: 12px;
}

.auth__field label {
    display: block;
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: var(--gh-muted);
}

.auth__field input[type="text"],
.auth__field input[type="password"],
.auth__field input[type="file"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 12px;
    border: 1px solid var(--gh-border);
    border-radius: 12px;
    background: #1e2537;
    color: var(--gh-text);
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.auth__field input[type="text"]:focus,
.auth__field input[type="password"]:focus,
.auth__field input[type="file"]:focus {
    border-color: rgba(37, 99, 235, 0.75);
    box-shadow: var(--gh-focus);
}

/* Leicht dezenter Hinweistext unter Feldern (z.B. Upload) */
.auth__hint {
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.35;
}

/* Optional: File-Button im Input anfarblich etwas angleichen (Browser support variiert) */
.auth__field input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: rgba(39, 74, 151, 0.35);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.auth__field input[type="file"]::file-selector-button:hover {
    background: rgba(39, 74, 151, 0.5);
}

.auth__actions {
    margin-top: 14px;
}

.auth__submit {
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background: var(--gh-primary);
    color: #ffffff;
    font-weight: 750;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 120ms ease, filter 120ms ease;
}

.auth__submit:hover {
    filter: brightness(1.02);
    transform: translateY(-1px);
}

.auth__submit:active {
    transform: translateY(0px);
}

.auth__links {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--gh-border);
}

.auth__muted {
    margin: 8px 0 0;
    color: var(--gh-muted);
}

.auth__muted a {
    color: var(--gh-link);
    text-decoration: none;
    font-weight: 700;
}

.auth__muted a:hover {
    text-decoration: underline;
}

.auth__sideCard {
    padding: 18px;
    background: var(--gh-card);
}

.auth__sideCard h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    color: var(--gh-text);
}

.auth__sideCard ul {
    margin: 0;
    padding-left: 18px;
    color: var(--gh-text);
}

.auth__sideCard li {
    margin: 8px 0;
    color: var(--gh-text);
}

.auth__tip {
    margin-top: 14px;
    padding: 12px 12px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.16);
    color: var(--gh-text);
}

@media (max-width: 900px) {
    .auth__grid {
        grid-template-columns: 1fr;
    }

    /* Side-Layout klappt auf Mobile automatisch auf 1 Spalte zusammen */
    .auth__grid.auth__card__side {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .auth__logo {
        width: 120px;
    }

    .auth__sideCard {
        display: none;
    }
}

@media (max-width: 520px) {
    .auth {
        padding-top: 18px;
    }

    .auth__card {
        padding: 18px;
    }

    .auth__header {
        grid-template-columns: 1fr;
    }

    .auth__logo {
        width: 140px;
        grid-row: auto;
    }
}