:root {
    --background: #eef2f7;
    --surface: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #dfe5ee;
    --primary: #1f3a5f;
    --primary-dark: #172f4e;
    --primary-light: #2b5b87;
    --accent: #62d4ad;
    --danger: #8f251d;
    --danger-soft: #fff0ee;
    --shadow: 0 24px 70px rgba(23, 32, 51, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 12%, rgba(43, 91, 135, 0.12), transparent 30%),
        radial-gradient(circle at 88% 85%, rgba(98, 212, 173, 0.15), transparent 28%),
        var(--background);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
    font: inherit;
}

.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px;
}

.login-card {
    display: grid;
    grid-template-columns: minmax(310px, 0.92fr) minmax(360px, 1.08fr);
    width: min(920px, 100%);
    min-height: 570px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 26px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 42px;
    color: #ffffff;
    background: linear-gradient(145deg, var(--primary-dark), var(--primary-light));
}

.brand-panel::before,
.brand-panel::after {
    position: absolute;
    content: "";
    border-radius: 50%;
    pointer-events: none;
}

.brand-panel::before {
    top: -90px;
    right: -90px;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        0 0 0 34px rgba(255, 255, 255, 0.035),
        0 0 0 70px rgba(255, 255, 255, 0.025);
}

.brand-panel::after {
    right: 28px;
    bottom: 72px;
    width: 120px;
    height: 120px;
    background: rgba(98, 212, 173, 0.09);
    filter: blur(2px);
}

.logo-wrap,
.brand-copy,
.brand-footer {
    position: relative;
    z-index: 1;
}

.logo-wrap {
    display: inline-flex;
    align-self: flex-start;
    padding: 13px 16px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

.logo {
    display: block;
    width: 154px;
    height: auto;
}

.brand-copy {
    margin: auto 0;
    padding: 54px 0;
}

.eyebrow {
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand-copy h1 {
    margin: 0;
    font-size: clamp(2.35rem, 5vw, 3.65rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.creator-credit {
    margin: 20px 0 0;
    color: #d6e2ed;
    font-size: 0.95rem;
    font-weight: 650;
    letter-spacing: 0.015em;
}

.brand-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d8e5ef;
    font-size: 0.86rem;
    font-weight: 650;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 5px rgba(98, 212, 173, 0.14);
}

.form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(38px, 7vw, 72px);
}

.form-heading {
    margin-bottom: 30px;
}

.eyebrow {
    margin-bottom: 7px;
    color: var(--primary-light);
}

.form-heading h2 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 2.55rem);
    letter-spacing: -0.04em;
}

.flash-list {
    display: grid;
    gap: 8px;
    margin: -6px 0 20px;
}

.flash-message {
    padding: 12px 14px;
    border: 1px solid #efb4ae;
    border-radius: 11px;
    color: var(--danger);
    background: var(--danger-soft);
    font-size: 0.9rem;
    font-weight: 700;
}

.login-form {
    display: grid;
    gap: 20px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    color: #344054;
    font-size: 0.88rem;
    font-weight: 750;
}

.field input {
    width: 100%;
    min-height: 52px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    color: var(--text);
    background: #ffffff;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input:hover {
    border-color: #c5cfdd;
}

.field input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(43, 91, 135, 0.12);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 55px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: inline-grid;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    place-items: center;
    color: #667085;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    color: var(--primary);
    background: #f0f4f8;
}

.password-toggle:focus-visible {
    outline: 3px solid rgba(43, 91, 135, 0.18);
}

.password-toggle svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.eye-closed {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

.submit-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    margin-top: 5px;
    padding: 14px 18px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 10px 24px rgba(31, 58, 95, 0.22);
    font-weight: 800;
    cursor: pointer;
    transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.submit-button span {
    font-size: 1.22rem;
    transition: transform 150ms ease;
}

.submit-button:hover {
    background: var(--primary-dark);
    box-shadow: 0 13px 28px rgba(31, 58, 95, 0.27);
    transform: translateY(-1px);
}

.submit-button:hover span {
    transform: translateX(3px);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:focus-visible {
    outline: 4px solid rgba(43, 91, 135, 0.18);
    outline-offset: 3px;
}

@media (max-width: 760px) {
    .login-page {
        align-items: start;
        padding: 16px;
    }

    .login-card {
        grid-template-columns: 1fr;
        min-height: auto;
        border-radius: 22px;
    }

    .brand-panel {
        min-height: 255px;
        padding: 26px;
    }

    .logo-wrap {
        padding: 9px 12px;
        border-radius: 14px;
    }

    .logo {
        width: 120px;
    }

    .brand-copy {
        padding: 36px 0 20px;
    }

    .brand-copy h1 {
        font-size: clamp(2rem, 11vw, 3rem);
    }

    .brand-footer {
        display: none;
    }

    .creator-credit {
        margin-top: 14px;
        font-size: 0.88rem;
    }

    .form-panel {
        padding: 32px 26px 36px;
    }

    .form-heading {
        margin-bottom: 24px;
    }
}

@media (max-width: 410px) {
    .login-page {
        padding: 0;
        background: #ffffff;
    }

    .login-card {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .brand-panel {
        min-height: 225px;
        border-radius: 0 0 24px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* Kompakte Smartphone-Anmeldung: Formular bleibt ohne unnötiges Scrollen sichtbar. */
@media (max-width: 760px) {
    .login-page {
        padding: 10px;
    }

    .login-card {
        border-radius: 18px;
    }

    .brand-panel {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        justify-content: initial;
        gap: 15px;
        min-height: 0;
        padding: 16px 18px;
    }

    .brand-panel::before {
        top: -105px;
        right: -105px;
        width: 210px;
        height: 210px;
    }

    .brand-panel::after {
        right: 18px;
        bottom: -35px;
        width: 95px;
        height: 95px;
    }

    .logo-wrap {
        padding: 7px 9px;
        border-radius: 12px;
    }

    .logo {
        width: 78px;
    }

    .brand-copy {
        margin: 0;
        padding: 0;
    }

    .brand-copy h1 {
        font-size: clamp(1.45rem, 7vw, 1.9rem);
        line-height: 1.02;
        letter-spacing: -0.045em;
    }

    .creator-credit {
        margin-top: 7px;
        font-size: 0.72rem;
    }

    .form-panel {
        padding: 22px 20px 26px;
    }

    .form-heading {
        margin-bottom: 17px;
    }

    .form-heading h2 {
        font-size: 1.7rem;
    }

    .login-form {
        gap: 15px;
    }

    .field input {
        min-height: 48px;
        padding: 11px 13px;
    }

    .submit-button {
        min-height: 49px;
        padding: 12px 16px;
    }
}

@media (max-width: 410px) {
    .brand-panel {
        min-height: 0;
        border-radius: 0 0 18px 18px;
    }
}
