/*
 * Login – login.php (neues Design)
 * Alles unter body.auth-v2 gekapselt. auth.css bleibt für register.php / verify.php.
 */

body.auth-v2 {
    --auth-line: color-mix(in srgb, var(--si-steel-hi, #4a6a99) 38%, transparent);
    --auth-well: rgb(6 12 24 / 0.72);
    --auth-panel: rgb(12 20 36 / 0.86);
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(1200px 700px at 80% -10%, rgb(60 90 160 / 0.22), transparent 60%),
        radial-gradient(900px 600px at -10% 110%, rgb(242 193 78 / 0.08), transparent 60%),
        #050a14;
    color: var(--si-text, #e6edf7);
    font-family: var(--si-font-body, system-ui, sans-serif);
}

.auth-v2 *,
.auth-v2 *::before,
.auth-v2 *::after { box-sizing: border-box; }

.auth-v2 .sip-ico { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.auth-v2 .auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 520px);
    min-height: 100vh;
    min-height: 100dvh;
}

/* ---------- Bildseite ---------- */
.auth-v2 .auth-hero {
    position: relative;
    overflow: hidden;
    background: #050a14 var(--auth-hero) center / cover no-repeat;
    border-right: 1px solid var(--auth-line);
}
.auth-v2 .auth-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgb(5 10 20 / 0.55) 0%, rgb(5 10 20 / 0) 30%, rgb(5 10 20 / 0.25) 55%, rgb(5 10 20 / 0.92) 100%),
        linear-gradient(90deg, transparent 70%, rgb(5 10 20 / 0.5) 100%);
}
.auth-v2 .auth-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    height: 100%;
    padding: clamp(24px, 4vw, 48px);
}
.auth-v2 .auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    color: var(--si-text, #e6edf7);
    text-decoration: none;
}
.auth-v2 .auth-brand__mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid color-mix(in srgb, var(--si-gold, #f2c14e) 60%, transparent);
    border-radius: 10px;
    background: rgb(5 10 20 / 0.6);
    color: var(--si-gold, #f2c14e);
    box-shadow: 0 0 18px rgb(242 193 78 / 0.25);
}
.auth-v2 .auth-brand__name {
    font: 700 1.25rem var(--si-font-display, sans-serif);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgb(0 0 0 / 0.6);
}
.auth-v2 .auth-eyebrow {
    margin: 0 0 8px;
    color: var(--si-gold, #f2c14e);
    font: 600 0.75rem var(--si-font-display, sans-serif);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.auth-v2 .auth-hero__title {
    max-width: 22ch;
    margin: 0 0 20px;
    font: 700 clamp(1.75rem, 3vw, 2.5rem) / 1.15 var(--si-font-display, sans-serif);
    text-shadow: 0 2px 16px rgb(0 0 0 / 0.7);
}
.auth-v2 .auth-perks {
    display: grid;
    gap: 12px;
    max-width: 460px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.auth-v2 .auth-perks li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid var(--auth-line);
    border-radius: var(--si-r-md, 10px);
    background: rgb(5 10 20 / 0.55);
    backdrop-filter: blur(6px);
    color: var(--si-text-muted, #9fb0c8);
    font-size: 0.875rem;
    line-height: 1.45;
}
.auth-v2 .auth-perks .sip-ico { margin-top: 2px; color: var(--si-gold, #f2c14e); }
.auth-v2 .auth-perks b { display: block; color: var(--si-text, #e6edf7); font-weight: 600; }

/* ---------- Formularseite ---------- */
.auth-v2 .auth-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 48px);
}
.auth-v2 .auth-panel {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}
.auth-v2 .auth-head { margin-bottom: 20px; }
.auth-v2 .auth-title {
    margin: 0 0 4px;
    font: 700 1.75rem var(--si-font-display, sans-serif);
    letter-spacing: 0.02em;
}
.auth-v2 .auth-sub { margin: 0; color: var(--si-text-muted, #9fb0c8); }

.auth-v2 .auth-msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid;
    border-radius: var(--si-r-md, 10px);
    font-size: 0.875rem;
    line-height: 1.4;
}
.auth-v2 .auth-msg .sip-ico { margin-top: 1px; }
.auth-v2 .auth-msg--error {
    border-color: color-mix(in srgb, var(--si-danger, #f58585) 55%, transparent);
    background: color-mix(in srgb, var(--si-danger, #f58585) 12%, transparent);
    color: #ffd0d0;
}
.auth-v2 .auth-msg--error .sip-ico { color: var(--si-danger, #f58585); }
.auth-v2 .auth-msg--ok {
    border-color: color-mix(in srgb, var(--si-ok, #5fd39a) 55%, transparent);
    background: color-mix(in srgb, var(--si-ok, #5fd39a) 12%, transparent);
    color: #c9f5de;
}
.auth-v2 .auth-msg--ok .sip-ico { color: var(--si-ok, #5fd39a); }

.auth-v2 .auth-form { display: grid; gap: 16px; margin: 0; }

.auth-v2 .auth-field { display: grid; gap: 6px; }
.auth-v2 .auth-field label {
    color: var(--si-text-muted, #9fb0c8);
    font: 600 0.75rem var(--si-font-display, sans-serif);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.auth-v2 .auth-field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--auth-line);
    border-radius: var(--si-r-md, 10px);
    background: var(--auth-well);
    color: var(--si-text, #e6edf7);
    font: 500 1rem var(--si-font-body, sans-serif);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-v2 .auth-field input:hover { border-color: color-mix(in srgb, var(--si-steel-hi, #4a6a99) 70%, transparent); }
.auth-v2 .auth-field input:focus {
    outline: none;
    border-color: var(--si-gold, #f2c14e);
    box-shadow: 0 0 0 3px rgb(242 193 78 / 0.18);
}
.auth-v2 .auth-field input:-webkit-autofill {
    -webkit-text-fill-color: var(--si-text, #e6edf7);
    -webkit-box-shadow: 0 0 0 40px #0a1424 inset;
    caret-color: var(--si-text, #e6edf7);
}

.auth-v2 .auth-pass { position: relative; }
.auth-v2 .auth-pass input { padding-right: 48px; }
.auth-v2 .auth-pass__toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--si-text-muted, #9fb0c8);
    cursor: pointer;
    transform: translateY(-50%);
}
.auth-v2 .auth-pass__toggle:hover { color: var(--si-text, #e6edf7); background: rgb(255 255 255 / 0.06); }
.auth-v2 .auth-pass__toggle:focus-visible { outline: 2px solid var(--si-gold, #f2c14e); outline-offset: 0; }
.auth-v2 .auth-eye { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-v2 .auth-eye__slash { display: none; }
.auth-v2 .auth-pass__toggle[aria-pressed="true"] .auth-eye__slash { display: inline; }
.auth-v2 .auth-pass__toggle[aria-pressed="true"] { color: var(--si-gold, #f2c14e); }

.auth-v2 .auth-remember {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--si-text-muted, #9fb0c8);
    font-size: 0.875rem;
    cursor: pointer;
}
.auth-v2 .auth-remember input { width: 18px; height: 18px; margin: 0; accent-color: var(--si-gold, #f2c14e); }

.auth-v2 .auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--si-r-md, 10px);
    font: 700 0.9375rem var(--si-font-display, sans-serif);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter 0.15s, box-shadow 0.15s, transform 0.05s;
}
.auth-v2 .auth-btn--primary {
    background: linear-gradient(180deg, var(--si-gold-hi, #ffd77a), var(--si-gold, #f2c14e));
    color: var(--si-gold-ink, #1a1205);
    box-shadow: 0 6px 22px rgb(242 193 78 / 0.25);
}
.auth-v2 .auth-btn--primary:hover { filter: brightness(1.06); box-shadow: 0 8px 28px rgb(242 193 78 / 0.35); }
.auth-v2 .auth-btn:active { transform: translateY(1px); }
.auth-v2 .auth-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Gespeicherte Anmeldung */
.auth-v2 .auth-resume {
    gap: 12px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--si-gold, #f2c14e) 40%, var(--auth-line));
    border-radius: var(--si-r-lg, 14px);
    background: var(--auth-panel);
}
.auth-v2 .auth-resume .auth-btn { text-transform: none; letter-spacing: 0.02em; font-size: 1rem; }
.auth-v2 .auth-resume__hint {
    margin: 0;
    color: var(--si-text-faint, #7286a5);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.auth-v2 .auth-resume__who { display: flex; gap: 12px; align-items: center; }
.auth-v2 .auth-resume__av {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 2px solid var(--si-gold, #f2c14e);
    border-radius: 50%;
    background: rgb(242 193 78 / 0.12);
    color: var(--si-gold, #f2c14e);
    font: 700 0.875rem var(--si-font-display, sans-serif);
}
.auth-v2 .auth-resume__name { font-weight: 700; font-size: 1.0625rem; overflow-wrap: anywhere; }
.auth-v2 .auth-resume__forget {
    justify-self: center;
    padding: 4px 8px;
    border: 0;
    background: none;
    color: var(--si-text-muted, #9fb0c8);
    font: inherit;
    font-size: 0.875rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.auth-v2 .auth-resume__forget:hover { color: var(--si-text, #e6edf7); }

.auth-v2 .auth-or {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 20px 0;
    color: var(--si-text-faint, #7286a5);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.auth-v2 .auth-or::before,
.auth-v2 .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--auth-line); }

.auth-v2 .auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--auth-line);
    font-size: 0.875rem;
}
.auth-v2 .auth-links a { color: var(--si-text-muted, #9fb0c8); text-decoration: none; }
.auth-v2 .auth-links a b { color: var(--si-gold, #f2c14e); }
.auth-v2 .auth-links a:hover { color: var(--si-text, #e6edf7); }
.auth-v2 .auth-links a:focus-visible { outline: 2px solid var(--si-gold, #f2c14e); outline-offset: 2px; border-radius: 4px; }

.auth-v2 .auth-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    color: var(--si-text-faint, #7286a5);
    font-size: 0.75rem;
}
.auth-v2 .auth-foot span { font-family: var(--si-font-mono, monospace); }
.auth-v2 .auth-foot a { color: inherit; text-decoration: none; }
.auth-v2 .auth-foot a:hover { color: var(--si-text, #e6edf7); text-decoration: underline; }

/* ---------- Schmal: einspaltig, Bild als Kopf ---------- */
@media (max-width: 860px) {
    .auth-v2 .auth-shell { grid-template-columns: minmax(0, 1fr); }
    .auth-v2 .auth-hero {
        border-right: 0;
        border-bottom: 1px solid var(--auth-line);
        background-position: center 45%;
    }
    .auth-v2 .auth-hero__inner { min-height: 220px; gap: 16px; padding: 20px 16px; }
    .auth-v2 .auth-hero__title { margin: 0; font-size: 1.5rem; }
    .auth-v2 .auth-perks { display: none; }
    .auth-v2 .auth-main { justify-content: flex-start; padding: 24px 16px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-v2 .auth-btn,
    .auth-v2 .auth-field input { transition: none; }
}

/* ---------- Anmeldung mit Google ---------- */
.auth-v2 .auth-google {
    display: flex;
    justify-content: center;
    min-height: 44px;
}
.auth-v2 .auth-google-id {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 14px;
    border: 1px solid var(--auth-line);
    border-radius: var(--si-r-pill, 999px);
    background: var(--auth-well);
}
.auth-v2 .auth-google-id__g {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #fff;
}
.auth-v2 .auth-google-id small {
    display: block;
    color: var(--si-text-faint, #7286a5);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.auth-v2 .auth-google-id b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.auth-v2 .auth-hint { color: var(--si-text-faint, #7286a5); font-size: 0.75rem; }
.auth-v2 .auth-more {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid var(--auth-line);
    border-radius: var(--si-r-lg, 14px);
    background: var(--auth-well);
}
.auth-v2 .auth-more summary {
    color: var(--si-text-muted, #9fb0c8);
    font-size: 0.875rem;
    cursor: pointer;
}
.auth-v2 .auth-more[open] summary { margin-bottom: 14px; }
.auth-v2 .auth-more .auth-btn {
    border-color: color-mix(in srgb, var(--si-gold, #f2c14e) 55%, transparent);
    background: transparent;
    color: var(--si-gold-hi, #ffd77a);
}
.auth-v2 .auth-more .auth-btn:hover { background: rgb(242 193 78 / 0.08); }
.auth-v2 .auth-cancel { display: flex; justify-content: center; margin-top: 14px; }
