/**
 * FastRoute Login – Celestial / Admin-Cockpit Style
 */

@import url('brand-colors.css?v=20260917header');

:root {
    --login-accent: var(--fr-brand);
    --login-accent-dark: var(--fr-brand-dark);
    --login-rose: var(--fr-accent-rose);
    --login-bg-deep: var(--fr-charcoal-deep);
    --login-bg: var(--fr-charcoal);
    --login-surface: var(--fr-charcoal-mid);
    --login-header-bg: linear-gradient(160deg, var(--fr-charcoal-deep) 0%, var(--fr-charcoal) 55%, var(--fr-charcoal-mid) 100%);
}

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--login-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    padding: 28px 16px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.login-page--register {
    justify-content: flex-start;
    padding-top: 28px;
    padding-bottom: 40px;
}

.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 85% 10%, rgba(20, 184, 166, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 60% 45% at 10% 90%, rgba(244, 63, 94, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.login-shell {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.12),
        0 24px 48px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-header {
    background: var(--login-header-bg);
    padding: 1.85rem 1.5rem 1.45rem;
    text-align: center;
    color: #fff;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    border-radius: 3px;
    background: var(--login-rose);
}

.login-brand {
    display: block;
    margin-bottom: 1rem;
    background: transparent;
    box-shadow: none;
    width: auto;
    height: auto;
}

.login-brand__img,
.login-header__brand img {
    display: block;
    margin: 0 auto;
    height: 48px;
    width: auto;
    max-width: min(260px, 88vw);
    object-fit: contain;
}

.login-header > .login-brand__img {
    margin-bottom: 0.85rem;
}

.login-header h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: #ffffff;
}

.login-header p {
    font-size: 0.88rem;
    color: #9aa3b5;
    margin: 0.45rem 0 0;
    font-weight: 500;
}

.login-header__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto 0.85rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.14);
    color: #5eead4;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-header__eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.login-body {
    padding: 1.65rem 1.45rem 1.45rem;
    background: #f0f2f5;
}

.login-body .form-label {
    font-weight: 650;
    color: #0f172a;
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
}

.login-body .form-text {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.login-body .form-control {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 0.78rem 1rem;
    font-size: 0.9375rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-body .form-control:focus {
    background: #fff;
    border-color: rgba(20, 184, 166, 0.55);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
    outline: none;
}

.login-body .btn-login {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.88rem 1rem;
    font-weight: 700;
    font-size: 0.98rem;
    width: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.32);
}

.login-body .btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(20, 184, 166, 0.4);
    color: #fff;
}

.login-body .btn-login:active {
    transform: translateY(0);
}

.login-links {
    text-align: center;
    margin-top: 1.15rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
}

.login-links a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 550;
    transition: color 0.15s ease;
}

.login-links a:hover {
    color: var(--login-accent-dark);
}

.login-links span {
    color: #cbd5e1;
    font-size: 0.75rem;
}

.login-lang {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.login-lang a {
    min-width: 38px;
    height: 32px;
    padding: 0 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.login-lang a:hover {
    border-color: rgba(20, 184, 166, 0.4);
    color: var(--login-accent-dark);
}

.login-lang a.is-active {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.login-page--rtl .login-choice {
    direction: rtl;
}

.login-alert {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.15rem;
    font-size: 0.875rem;
    border: 1px solid rgba(244, 63, 94, 0.2);
    background: #fff1f2;
    color: #be123c;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.login-alert i {
    margin-top: 0.1rem;
}

.login-alert--success {
    background: #f0fdf4;
    color: #15803d;
    border-color: rgba(22, 163, 74, 0.2);
}

.login-body .form-select {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 0.78rem 1rem;
    font-size: 0.9375rem;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-body .form-select:focus {
    background: #fff;
    border-color: rgba(20, 184, 166, 0.55);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
    outline: none;
}

.login-role-box {
    display: none;
}

.login-role-box.is-visible {
    display: block;
}

.login-shell--register {
    max-width: 480px;
}

/* Login-Auswahl (login.php) */
.login-choices {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.login-choice {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    padding: 1rem 1.05rem;
    background: #ffffff;
    border-radius: 14px;
    text-decoration: none;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.login-choice:hover {
    background: #fff;
    border-color: rgba(20, 184, 166, 0.35);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
    color: #0f172a;
}

.login-choice-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: #fff;
}

.login-choice-icon--kunde {
    background: linear-gradient(135deg, #2dd4bf, #14b8a6);
}
.login-choice-icon--fahrer {
    background: linear-gradient(135deg, #2dd4bf, #14b8a6);
}
.login-choice-icon--admin {
    background: linear-gradient(135deg, #fb7185, #f43f5e);
}

.login-choice div {
    flex: 1;
    min-width: 0;
}

.login-choice strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 750;
    margin-bottom: 0.12rem;
    letter-spacing: -0.01em;
}

.login-choice span {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.login-choice .bi-chevron-right {
    color: #94a3b8;
    flex-shrink: 0;
}

.login-footer-note {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.75rem;
    color: #8b93a7;
    font-weight: 500;
}

/* Admin login extras */
.login-page--admin .login-header::after {
    background: var(--login-accent);
}

.login-admin-avatar {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.12);
    position: relative;
}

.login-admin-avatar::after {
    content: '';
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #1e212b;
}

/* Mobile PIN Login */
.login-page--mobile .login-box {
    max-width: 100%;
}

.login-pin-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.login-pin-digit {
    width: 46px;
    height: 54px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-pin-digit:focus {
    border-color: rgba(20, 184, 166, 0.55);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
    outline: none;
    background: #fff;
}

.login-alt-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
}

.login-alt-link:hover {
    color: var(--login-accent-dark);
}

@media (max-width: 480px) {
    .login-page {
        padding: 18px 12px 24px;
        justify-content: flex-start;
        padding-top: max(18px, env(safe-area-inset-top));
    }

    .login-header {
        padding: 1.4rem 1.15rem 1.2rem;
    }

    .login-body {
        padding: 1.25rem 1.05rem 1.15rem;
    }

    .login-choice {
        padding: 0.9rem 0.95rem;
    }

    .login-pin-digit {
        width: 42px;
        height: 50px;
    }
}
