/* ===== LOGIN-SEITE — Split-Layout + Glass-Card =====
   Übernimmt das Final-Design (Stand 2026-04-19):
   links Branding-Panel mit Gradient + diagonalem Pattern + Container-Timeline,
   rechts Glass-Card mit Underline-Inputs. Fonts: System-Stack (kein Google Fonts,
   damit bestehende CSP nicht erweitert werden muss). */

/* Login-spezifische Tokens (scoped über .auth-body, damit Rest der App
   nicht betroffen ist) */
.auth-body {
    --auth-grad-from:    #1e3a8a;
    --auth-grad-to:      #2563eb;
    --glass-bg:          rgba(255, 255, 255, 0.08);
    --glass-border:      rgba(255, 255, 255, 0.18);
    --glass-fg:          #f9fafb;
    --glass-fg-dim:      rgba(255, 255, 255, 0.7);
    --glass-fg-mute:     rgba(255, 255, 255, 0.45);
    --pattern-color:     rgba(255, 255, 255, 0.08);
    --auth-card-radius:  1rem;
    --auth-ease:         cubic-bezier(.22, .61, .36, 1);
}
[data-theme="dark"] .auth-body {
    --auth-grad-from: #0f172a;
    --auth-grad-to:   #1e3a8a;
}

/* Body auf Vollhöhe, kein horizontales Scroll */
.auth-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .4s var(--auth-ease), color .4s var(--auth-ease);
}

/* Stage: 2-spaltiges Split-Layout */
.auth-stage {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    position: relative;
    overflow: hidden;
}

/* ===== Branding-Seite (links) ===== */
.auth-brand {
    position: relative;
    padding: 3.5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, var(--auth-grad-from) 0%, var(--auth-grad-to) 100%);
    color: var(--glass-fg);
}

/* Diagonales Line-Pattern */
.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.035) 0,
        rgba(255, 255, 255, 0.035) 1px,
        transparent 1px,
        transparent 22px
    );
}

/* Subtiler Glow links-oben */
.auth-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 60% at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
}

.brand-head {
    position: relative;
    z-index: 2;
}

.brand-hero {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-block: auto;
}

.hero-title {
    font-size: clamp(2.75rem, 5.5vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 0.98;
    margin: 0;
    color: #fff;
}
.hero-title .em {
    font-weight: 300;
    font-style: italic;
    color: rgba(255, 255, 255, 0.75);
}

.hero-tag {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.hero-tag::before {
    content: '';
    width: 2rem;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
}

.brand-foot {
    position: relative;
    z-index: 2;
}

/* Container-Timeline: Deutschland → Auf dem Weg → Angola → Geschäft */
.timeline {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 440px;
    padding: 1.5rem 0 0.25rem;
}
.timeline-track {
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    top: 2rem;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        rgba(255, 255, 255, 0.35) 0,
        rgba(255, 255, 255, 0.35) 4px,
        transparent 4px,
        transparent 9px
    );
}
.timeline-stop {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    flex: 1;
    opacity: 0;
    animation: stopIn .5s var(--auth-ease) both;
    animation-delay: calc(var(--i) * 0.12s + 0.3s);
}
@keyframes stopIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}
.timeline-stop .dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
    position: relative;
}
.timeline-stop:last-child .dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25), 0 0 12px rgba(34, 197, 94, 0.6);
}
.timeline-stop:last-child .dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(34, 197, 94, 0.5);
    animation: attention-dot-pulse 1.6s ease-out infinite;
}
.timeline-stop .lbl {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: filter .3s var(--auth-ease), opacity .3s var(--auth-ease);
}
.timeline-stop:last-child .lbl { color: rgba(255, 255, 255, 0.85); }

/* Blur-Morph beim Sprach-Wechsel der Timeline-Labels */
.timeline.is-morphing .lbl {
    filter: blur(6px);
    opacity: 0.35;
}

/* ===== Auth-Panel (rechts) ===== */
.auth-panel {
    position: relative;
    display: grid;
    place-items: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--auth-grad-from) 0%, var(--auth-grad-to) 100%);
    overflow: hidden;
}
.auth-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    pointer-events: none;
}

/* Glass-Card */
.auth-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: var(--auth-card-radius);
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid var(--glass-border);
    color: var(--glass-fg);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    animation: cardIn .6s var(--auth-ease) both;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px) scale(.99); }
    to   { opacity: 1; transform: none; }
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-logo img {
    height: 4rem;
    display: block;
    margin: 0 auto 0.5rem;
}
.auth-logo h1 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0;
}
.auth-logo .sub {
    display: block;
    font-size: 0.8125rem;
    color: var(--glass-fg-dim);
    font-weight: 400;
    margin-top: 0.375rem;
}

/* Form — Underline-Inputs */
.auth-form .form-group {
    margin-bottom: 1.25rem;
}
.auth-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--glass-fg-dim);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}
.auth-form .form-control {
    width: 100%;
    padding: 0.125rem 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition:
        border-color .2s var(--auth-ease),
        box-shadow .2s var(--auth-ease);
}
.auth-form .form-control::placeholder { color: var(--glass-fg-mute); }
.auth-form .form-control:hover { border-bottom-color: rgba(255, 255, 255, 0.35); }
.auth-form .form-control:focus {
    border-bottom-color: rgba(var(--color-primary-rgb), 1);
    box-shadow: 0 1px 0 0 rgba(var(--color-primary-rgb), 1);
}

/* Login-Button — matched to .btn.btn-primary */
.auth-form .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1rem;
    margin-top: 0.5rem;
    border-radius: var(--radius);
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 20px -6px rgba(var(--color-primary-rgb), 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition:
        background .2s var(--auth-ease),
        transform .15s var(--auth-ease),
        box-shadow .2s var(--auth-ease);
}
.auth-form .btn:hover {
    background: var(--color-primary-d);
    box-shadow:
        0 10px 28px -6px rgba(var(--color-primary-rgb), 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.auth-form .btn:active { transform: translateY(1px); }
.auth-form .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-arrow {
    font-size: 0.75rem;
    opacity: 0.7;
    transform: translateX(-4px);
    transition: transform .2s var(--auth-ease), opacity .2s var(--auth-ease);
}
.auth-form .btn:hover .btn-arrow {
    transform: translateX(2px);
    opacity: 1;
}

/* Alerts auf Glass */
.auth-card .alert {
    padding: 0.75rem 0.875rem;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}
.auth-card .alert-warning {
    background: rgba(217, 119, 6, 0.15);
    border-color: rgba(217, 119, 6, 0.4);
    color: #fbbf24;
}
.auth-card .alert-error {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.4);
    color: #fca5a5;
}

/* Caps-Lock-Hinweis — inline neben dem Passwort-Label.
   Element ist immer im DOM; Sichtbarkeit per .is-visible-Klasse mit
   Opacity/Transform-Transition (smoother als display:none-Toggle). */
.auth-capslock-warn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #fbbf24;
    background: rgba(217, 119, 6, 0.15);
    border: 1px solid rgba(217, 119, 6, 0.35);
    padding: 0.125rem 0.4375rem;
    border-radius: 0.25rem;
    letter-spacing: 0.02em;
    float: right;
    opacity: 0;
    transform: translateX(4px);
    transition: opacity .2s var(--auth-ease), transform .2s var(--auth-ease);
    pointer-events: none;
}
.auth-capslock-warn.is-visible {
    opacity: 1;
    transform: translateX(0);
}
.auth-capslock-warn i { font-size: 0.625rem; }

/* Sprachumschalter */
.auth-lang {
    text-align: center;
    margin-top: 1.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.75rem;
    color: var(--glass-fg-mute);
    letter-spacing: 0.08em;
}
.auth-lang a {
    color: var(--glass-fg-mute);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: color .15s var(--auth-ease), background .15s var(--auth-ease);
}
.auth-lang a:hover,
.auth-lang a.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* Theme-Toggle oben rechts */
.auth-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
}
.auth-theme-toggle .btn-theme {
    width: 2.375rem;
    height: 2.375rem;
    border-radius: 0.625rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.8);
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
    transition: color .15s var(--auth-ease), background .2s var(--auth-ease), transform .2s var(--auth-ease);
}
.auth-theme-toggle .btn-theme:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
}
.auth-theme-toggle .btn-theme i { font-size: 0.875rem; }

/* Responsive */
@media (max-width: 900px) {
    .auth-stage { grid-template-columns: 1fr; }
    .auth-brand {
        padding: 2rem 1.75rem 2.5rem;
        min-height: 36vh;
    }
    .brand-hero { gap: 1.5rem; }
    .timeline { max-width: 100%; }
    .auth-panel {
        padding: 1.5rem 1.25rem 2.5rem;
        background: var(--auth-grad-to);
    }
    .auth-card { padding: 2rem 1.75rem 1.5rem; max-width: 480px; }
    .hero-title { font-size: clamp(2.25rem, 8vw, 3.25rem); }
}
@media (max-width: 480px) {
    .auth-card { padding: 1.75rem 1.5rem 1.25rem; }
}

/* Reduced-Motion: Animationen abschalten */
@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .timeline-stop,
    .timeline-stop:last-child .dot::after { animation: none; }
    .timeline-stop .lbl,
    .timeline.is-morphing .lbl {
        transition: none;
        filter: none;
        opacity: 1;
    }
    .auth-capslock-warn { transition: none; }
}

/* =====================================================
   _auth.css
   Zweck:          Login-Seite (Split-Layout + Glass-Card)
   Verwendet von:  auth.php, geladen als Core-CSS
   Abhaengigkeiten: base/_variables.css, components/_form.css
   Verantwortlich: Gesamtes Login-Design
   ===================================================== */
