/* =========================================================
   BERGMANN AGENCY
   Kundenportal – Login / Registrierung
   Datei: css/auth.css
========================================================= */


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

html {
    font-size: 16px;
}

body {
    font-family: "Poppins", sans-serif;
    background: #080d18;
    color: #ffffff;
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: 0;
}

input {
    outline: none;
}


/* =========================================================
   VARIABLEN
========================================================= */

:root {
    --bg: #080d18;
    --bg-light: #0d1424;

    --card: rgba(16, 24, 40, 0.78);
    --card-hover: rgba(22, 32, 52, 0.92);

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.14);

    --text: #ffffff;
    --muted: #8e9bb3;

    --blue: #2196ff;
    --cyan: #00d4ff;
    --purple: #7c4dff;

    --green: #27d17f;
    --red: #ff5571;

    --radius-small: 12px;
    --radius-medium: 18px;
    --radius-large: 28px;

    --shadow:
        0 30px 80px rgba(0, 0, 0, 0.45);

    --transition:
        0.25s ease;
}


/* =========================================================
   SEITE
========================================================= */

.auth-page {
    position: relative;

    width: 100%;
    min-height: 100vh;
    min-height: 100svh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 60px 24px;

    isolation: isolate;
    overflow: hidden;
}


/* =========================================================
   HINTERGRUND
========================================================= */

.auth-background {
    position: fixed;
    inset: 0;
    z-index: -2;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(33, 150, 255, 0.07),
            transparent 42%
        ),
        linear-gradient(
            180deg,
            #080d18 0%,
            #080d18 60%,
            #070b14 100%
        );
}

.background-glow {
    position: absolute;

    width: 500px;
    height: 500px;

    border-radius: 50%;

    filter: blur(120px);

    opacity: 0.18;

    pointer-events: none;
}

.background-glow-blue {
    top: -180px;
    left: -170px;

    background: var(--blue);
}

.background-glow-purple {
    right: -200px;
    bottom: -220px;

    background: var(--purple);
}


/* =========================================================
   GRID
========================================================= */

.background-grid {
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );

    background-size: 48px 48px;

    mask-image:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.7),
            transparent 90%
        );

    -webkit-mask-image:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.7),
            transparent 90%
        );
}


/* =========================================================
   ZURÜCK
========================================================= */

.back-home {
    position: absolute;

    top: 28px;
    left: 32px;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--muted);

    font-size: 14px;
    font-weight: 500;

    transition: var(--transition);
}

.back-home:hover {
    color: #ffffff;
    transform: translateX(-3px);
}


/* =========================================================
   CONTAINER
========================================================= */

.auth-container {
    width: 100%;
    max-width: 500px;

    position: relative;
    z-index: 2;
}


/* =========================================================
   LOGO
========================================================= */

.auth-brand {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 28px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition:
        transform var(--transition),
        opacity var(--transition);
}

.brand-logo:hover {
    transform: scale(1.02);
    opacity: 0.92;
}

.brand-logo-image {
    display: block;

    width: auto;
    height: auto;

    max-width: 190px;
    max-height: 80px;

    object-fit: contain;
}


/* =========================================================
   KARTE
========================================================= */

.auth-card {
    position: relative;

    width: 100%;

    padding: 38px;

    background:
        linear-gradient(
            145deg,
            rgba(18, 27, 46, 0.9),
            rgba(10, 17, 30, 0.84)
        );

    border: 1px solid var(--border);

    border-radius: var(--radius-large);

    box-shadow:
        var(--shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);

    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
}

.auth-card::before {
    content: "";

    position: absolute;

    inset: 0;

    border-radius: inherit;

    padding: 1px;

    background:
        linear-gradient(
            135deg,
            rgba(33, 150, 255, 0.25),
            transparent 35%,
            transparent 65%,
            rgba(124, 77, 255, 0.14)
        );

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);

    -webkit-mask-composite: xor;
    mask-composite: exclude;

    pointer-events: none;
}


/* =========================================================
   HEADER
========================================================= */

.auth-header {
    text-align: center;

    margin-bottom: 32px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 30px;

    padding: 6px 12px;

    margin-bottom: 18px;

    border-radius: 999px;

    border: 1px solid rgba(33, 150, 255, 0.22);

    background: rgba(33, 150, 255, 0.08);

    color: #72bdff;

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-header h1 {
    color: var(--text);

    font-size: clamp(27px, 4vw, 34px);
    font-weight: 700;

    line-height: 1.2;

    margin-bottom: 12px;
}

.auth-header p {
    max-width: 390px;

    margin: 0 auto;

    color: var(--muted);

    font-size: 14px;
    font-weight: 400;

    line-height: 1.7;
}


/* =========================================================
   FORMULAR
========================================================= */

.auth-form {
    display: flex;
    flex-direction: column;

    gap: 21px;
}

.form-group {
    display: flex;
    flex-direction: column;

    gap: 9px;
}

.form-group label {
    color: #dce6f5;

    font-size: 13px;
    font-weight: 500;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
}


/* =========================================================
   INPUTS
========================================================= */

.input-wrapper {
    position: relative;

    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    height: 54px;

    padding:
        0
        50px
        0
        48px;

    color: #ffffff;

    background:
        rgba(255, 255, 255, 0.035);

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 14px;

    font-size: 14px;

    transition:
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.input-wrapper input::placeholder {
    color: #66748d;
}

.input-wrapper input:hover {
    border-color:
        rgba(255, 255, 255, 0.13);
}

.input-wrapper input:focus {
    border-color:
        rgba(33, 150, 255, 0.65);

    background:
        rgba(33, 150, 255, 0.035);

    box-shadow:
        0 0 0 4px
        rgba(33, 150, 255, 0.08);
}


/* =========================================================
   INPUT ICON
========================================================= */

.input-icon {
    position: absolute;

    left: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #65738b;

    pointer-events: none;

    transition: var(--transition);
}

.input-wrapper:focus-within .input-icon {
    color: var(--blue);
}


/* =========================================================
   PASSWORT BUTTON
========================================================= */

.password-toggle {
    position: absolute;

    right: 11px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #74819a;

    background: transparent;

    border-radius: 10px;

    cursor: pointer;

    transition: var(--transition);
}

.password-toggle:hover {
    color: #ffffff;

    background:
        rgba(255, 255, 255, 0.055);
}


/* =========================================================
   PASSWORT VERGESSEN
========================================================= */

.forgot-password-link {
    color: #76bfff;

    font-size: 12px;
    font-weight: 500;

    transition: var(--transition);
}

.forgot-password-link:hover {
    color: var(--cyan);
}


/* =========================================================
   FEHLER
========================================================= */

.form-error {
    min-height: 14px;

    color: var(--red);

    font-size: 11px;
    line-height: 1.4;
}


/* =========================================================
   CHECKBOX
========================================================= */

.form-options {
    display: flex;
    align-items: center;

    margin-top: -5px;
}

.checkbox {
    display: inline-flex;
    align-items: center;

    gap: 10px;

    cursor: pointer;
}

.checkbox input {
    position: absolute;

    opacity: 0;
    pointer-events: none;
}

.checkbox-box {
    width: 18px;
    height: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid
        rgba(255, 255, 255, 0.15);

    border-radius: 5px;

    color: #ffffff;

    background:
        rgba(255, 255, 255, 0.035);

    transition: var(--transition);
}

.checkbox-box svg {
    opacity: 0;

    transform: scale(0.7);

    transition: var(--transition);
}

.checkbox input:checked + .checkbox-box {
    border-color: var(--blue);

    background: var(--blue);

    box-shadow:
        0 0 16px
        rgba(33, 150, 255, 0.25);
}

.checkbox input:checked + .checkbox-box svg {
    opacity: 1;

    transform: scale(1);
}

.checkbox-text {
    color: var(--muted);

    font-size: 12px;
    font-weight: 400;
}


/* =========================================================
   LOGIN BUTTON
========================================================= */

.auth-submit {
    position: relative;

    width: 100%;
    height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    margin-top: 2px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #168dff,
            #2c72ff
        );

    border-radius: 14px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    overflow: hidden;

    box-shadow:
        0 14px 35px
        rgba(33, 150, 255, 0.23);

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        filter var(--transition);
}

.auth-submit::before {
    content: "";

    position: absolute;

    width: 70px;
    height: 200%;

    top: -50%;
    left: -100px;

    transform: rotate(20deg);

    background:
        rgba(255, 255, 255, 0.17);

    filter: blur(5px);

    transition: left 0.55s ease;
}

.auth-submit:hover::before {
    left: calc(100% + 30px);
}

.auth-submit:hover {
    transform: translateY(-2px);

    box-shadow:
        0 17px 42px
        rgba(33, 150, 255, 0.32);
}

.auth-submit:active {
    transform: translateY(0);
}

.button-text,
.button-arrow {
    position: relative;
    z-index: 2;
}

.button-arrow {
    transition: transform var(--transition);
}

.auth-submit:hover .button-arrow {
    transform: translateX(3px);
}


/* =========================================================
   LOADER
========================================================= */

.button-loader {
    display: none;

    width: 19px;
    height: 19px;

    border:
        2px solid
        rgba(255, 255, 255, 0.35);

    border-top-color: #ffffff;

    border-radius: 50%;

    animation: buttonSpinner 0.75s linear infinite;
}

.auth-submit.loading .button-loader {
    display: block;
}

.auth-submit.loading .button-text,
.auth-submit.loading .button-arrow {
    display: none;
}

@keyframes buttonSpinner {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   TRENNLINIE
========================================================= */

.auth-divider {
    display: flex;
    align-items: center;

    gap: 13px;

    margin: 28px 0 20px;
}

.auth-divider span {
    flex: 1;

    height: 1px;

    background:
        rgba(255, 255, 255, 0.075);
}

.auth-divider p {
    color: #697790;

    font-size: 11px;
    white-space: nowrap;
}


/* =========================================================
   REGISTRIEREN
========================================================= */

.register-button {
    width: 100%;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    color: #dce7f6;

    background:
        rgba(255, 255, 255, 0.035);

    border:
        1px solid
        rgba(255, 255, 255, 0.09);

    border-radius: 14px;

    font-size: 13px;
    font-weight: 500;

    transition:
        background var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.register-button svg {
    transition: transform var(--transition);
}

.register-button:hover {
    background:
        rgba(255, 255, 255, 0.06);

    border-color:
        rgba(33, 150, 255, 0.28);

    transform: translateY(-1px);
}

.register-button:hover svg {
    transform: translateX(3px);
}


/* =========================================================
   SECURITY INFO
========================================================= */

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    margin-top: 23px;

    color: #65728a;

    font-size: 10px;

    text-align: center;
}

.security-note svg {
    color: var(--green);

    flex-shrink: 0;
}


/* =========================================================
   AUTH MELDUNG
========================================================= */

.auth-message {
    padding: 12px 14px;

    margin-bottom: 20px;

    border-radius: 12px;

    color: #ff9aad;

    background:
        rgba(255, 85, 113, 0.08);

    border:
        1px solid
        rgba(255, 85, 113, 0.17);

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   FOOTER
========================================================= */

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 9px;

    margin-top: 23px;

    color: #56647c;

    font-size: 10px;
}

.auth-footer a {
    transition: color var(--transition);
}

.auth-footer a:hover {
    color: #91a2bc;
}

.footer-dot {
    color: #394459;
}


/* =========================================================
   ANIMATION
========================================================= */

.auth-container {
    animation:
        authAppear 0.65s ease forwards;
}

@keyframes authAppear {

    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 700px) {

    .auth-page {
        align-items: flex-start;

        padding:
            92px
            18px
            35px;
    }

    .back-home {
        top: 25px;
        left: 20px;

        font-size: 12px;
    }

    .auth-brand {
        margin-bottom: 22px;
    }

    .brand-logo-image {
        max-width: 160px;
        max-height: 68px;
    }

    .auth-card {
        padding: 31px 24px;

        border-radius: 23px;
    }

    .auth-header {
        margin-bottom: 27px;
    }

    .auth-header h1 {
        font-size: 27px;
    }

    .auth-header p {
        font-size: 13px;
    }

}


/* =========================================================
   HANDY
========================================================= */

@media (max-width: 480px) {

    body {
        background: #080d18;
    }

    .auth-page {
        min-height: 100svh;

        padding:
            82px
            14px
            26px;
    }

    .back-home {
        top: 22px;
        left: 17px;
    }

    .back-home span {
        font-size: 11px;
    }

    .brand-logo-image {
        max-width: 145px;
        max-height: 60px;
    }

    .auth-card {
        padding:
            27px
            18px
            24px;

        border-radius: 21px;
    }

    .auth-header {
        margin-bottom: 25px;
    }

    .auth-badge {
        margin-bottom: 15px;

        font-size: 10px;
    }

    .auth-header h1 {
        font-size: 25px;
    }

    .auth-header p {
        max-width: 300px;

        font-size: 12px;
        line-height: 1.65;
    }

    .auth-form {
        gap: 18px;
    }

    .input-wrapper input {
        height: 52px;

        font-size: 13px;

        border-radius: 13px;
    }

    .auth-submit {
        height: 53px;

        border-radius: 13px;
    }

    .register-button {
        height: 50px;

        border-radius: 13px;
    }

    .label-row {
        align-items: flex-start;
    }

    .forgot-password-link {
        font-size: 10px;
    }

    .auth-divider {
        gap: 8px;
    }

    .auth-divider p {
        font-size: 9px;
    }

    .security-note {
        font-size: 9px;
    }

    .auth-footer {
        max-width: 290px;

        margin-left: auto;
        margin-right: auto;

        line-height: 1.7;
    }

}


/* =========================================================
   SEHR KLEINE HANDYS
========================================================= */

@media (max-width: 350px) {

    .auth-card {
        padding-left: 15px;
        padding-right: 15px;
    }

    .label-row {
        flex-direction: column;

        gap: 5px;
    }

    .auth-divider p {
        white-space: normal;

        text-align: center;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;

        scroll-behavior: auto !important;
    }

}

/* =========================================================
   REGISTRIERUNG
========================================================= */

.register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.register-card {
    padding-top: 30px;
    padding-bottom: 30px;
}

.register-form {
    gap: 13px;
}

.register-form .form-group {
    gap: 5px;
}

.register-form .input-wrapper input {
    height: 48px;
}

.register-form .form-error {
    min-height: 10px;
}

.register-form .checkbox-text a {
    color: #76bfff;
}

.register-form .checkbox-text a:hover {
    color: var(--cyan);
}


/* Kleine Bildschirme */
@media (max-width: 520px) {

    .register-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .register-card {
        padding: 22px 18px;
    }

    .register-form {
        gap: 10px;
    }

    .register-form .input-wrapper input {
        height: 45px;
    }

    .register-card .auth-header {
        margin-bottom: 18px;
    }

    .register-card .auth-header h1 {
        font-size: 23px;
    }

    .register-card .auth-header p {
        font-size: 11px;
    }

}


/* Kleine Bildschirmhöhe */
@media (max-height: 800px) {

    .register-card {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .register-card .auth-header {
        margin-bottom: 15px;
    }

    .register-card .auth-badge {
        margin-bottom: 9px;
    }

    .register-card .auth-header p {
        line-height: 1.45;
    }

    .register-form {
        gap: 8px;
    }

    .register-form .input-wrapper input {
        height: 43px;
    }

    .register-card .auth-divider {
        margin: 15px 0 12px;
    }

}