/* Critical CSS für Login-Seite - Verhindert FOUC */

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Login Body */
.login-body {
    background: url('/media/backgrounds/background-1.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Background Overlay */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(228, 195, 157, 0.9) 0%, rgba(180, 136, 88, 0.8) 100%);
    z-index: 1;
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 450px;
    width: 100%;
    position: relative;
    opacity: 1;
    transform: translateY(0);
}

/* Logo */
.logo-img {
    width: 200px;
    height: auto;
    margin-bottom: 1rem;
    display: block;
}

/* Typography */
.welcome-title {
    color: #2D1F16;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.welcome-subtitle {
    color: #6B7280;
    font-size: 1rem;
    margin-bottom: 0;
    margin-top: 0;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 18px;
    z-index: 1;
    color: #B48858;
    font-size: 18px;
    pointer-events: none;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-input {
    background: #F8F9FA;
    border: 2px solid #E5E7EB;
    border-radius: 16px;
    padding: 20px 20px 20px 52px;
    font-size: 1rem;
    transition: all 0.3s ease;
    height: 60px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    position: relative;
    z-index: 2;
    line-height: 1.2;
}

.custom-input:focus {
    background: #FFFFFF;
    border-color: #B48858;
    box-shadow: 0 0 0 4px rgba(180, 136, 88, 0.1);
    outline: none;
}

.custom-input::placeholder {
    color: #9CA3AF;
    font-size: 1rem;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 18px;
    cursor: pointer;
    color: #6B7280;
    font-size: 18px;
    transition: color 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #B48858;
}

/* Buttons */
.btn-login {
    background: linear-gradient(135deg, #E4C39D 0%, #B48858 100%);
    border: none;
    border-radius: 16px;
    padding: 20px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2D1F16;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(180, 136, 88, 0.3);
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(180, 136, 88, 0.4);
    background: linear-gradient(135deg, #B48858 0%, #E4C39D 100%);
    color: #2D1F16;
}

.btn-login:active {
    transform: translateY(0);
}

/* Links */
.forgot-link {
    color: #B48858;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #2D1F16;
    text-decoration: underline;
}

/* Signup Section */
.signup-section {
    border-top: 1px solid #E5E7EB;
    padding-top: 1.5rem;
}

.signup-text {
    color: #6B7280;
    margin-bottom: 0;
}

.signup-link {
    color: #B48858;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.signup-link:hover {
    color: #2D1F16;
    text-decoration: underline;
}

/* Footer */
.login-footer {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-content {
    text-align: center;
}

.language-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.language-link {
    color: #6B7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

.language-link:hover,
.language-link.active {
    color: #B48858;
    background: rgba(180, 136, 88, 0.1);
}

.legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.legal-link {
    color: #6B7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.legal-link:hover {
    color: #B48858;
}

.separator {
    color: #D1D5DB;
}

.copyright p {
    color: #6B7280;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Status Messages */
.alert {
    border-radius: 12px;
    border: none;
    font-weight: 500;
    margin-bottom: 1rem;
    padding: 1rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
    border-left: 4px solid #22C55E;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400E;
    border-left: 4px solid #F59E0B;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1E40AF;
    border-left: 4px solid #3B82F6;
}

/* Form Switching Animation */
#login-container,
#reset-password-container {
    transition: all 0.3s ease-in-out;
}

/* FOUC Prevention */
.no-fouc {
    visibility: hidden;
}

.fouc-ready {
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .welcome-title {
        font-size: 1.75rem;
    }

    .logo-img {
        width: 150px;
    }

    .language-selector {
        gap: 0.5rem;
    }

    .legal-links {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem 1rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .custom-input {
        padding: 18px 18px 18px 48px;
        height: 56px;
    }

    .input-icon {
        left: 16px;
        font-size: 16px;
    }

    .btn-login {
        height: 56px;
        padding: 18px 20px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.w-100 {
    width: 100%;
}

.me-2 {
    margin-right: 0.5rem;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
