/* ============================================= */
/* AUTH.CSS - Authentication & Login Styles     */
/* ============================================= */

/* Auth Container */
.screen-content#auth-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 2rem;
}

/* Logo Container */
.logo-container {
    text-align: center;
    margin-bottom: 3rem;
}

.logo-container .logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    display: block;
}

.logo-container .app-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.logo-container .app-subtitle {
    color: #ffffff;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
    justify-content: center;
    background: white;
    border-radius: 12px 12px 0 0;
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.tab-btn:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.tab-btn.active {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 20%;
    right: 20%;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    animation: slideIn 0.3s ease;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

/* Auth Forms - Helle Cards */
.auth-form {
    max-width: 1050px;
    margin: 0 auto;
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.auth-form h2 {
    margin-bottom: 2rem;
    text-align: center;
    color: #1f2937;
    font-size: 1.75rem;
    font-weight: 600;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: #768192;
    font-size: 0.875rem;
    letter-spacing: 0.25px;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-group input:hover {
    border-color: #d1d5db;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
    font-size: 0.95rem;
}

/* Password Input Specific */
.form-group input[type="password"] {
    font-family: caption;
    letter-spacing: 1px;
}

.form-group input[type="password"]::placeholder {
    font-family: inherit;
    letter-spacing: normal;
}

/* Form Buttons */
.auth-form .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: none;
    letter-spacing: 0.25px;
}

.auth-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.25);
}

.auth-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

.auth-form .btn-primary:active {
    transform: translateY(0);
}

.auth-form .btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
    margin-top: 1rem;
    border: 2px solid #e5e7eb;
}

.auth-form .btn-secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* Form Info Box */
.form-info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.6;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

/* Form Footer */
.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.form-footer a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-footer a:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Small helper text */
.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #9ca3af;
    font-size: 0.75rem;
}

/* License Key Input Formatting */
input[name="license"] {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Loading State */
.auth-form.loading {
    position: relative;
    pointer-events: none;
}

.auth-form.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    z-index: 1;
}

.auth-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 2;
}

/* Success State */
.form-group.success input {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

/* Error State */
.form-group.error input {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.form-group .error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideIn {
    from { 
        width: 0;
        opacity: 0;
    }
    to { 
        width: 60%;
        opacity: 1;
    }
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* Focus Visible for Accessibility */
.tab-btn:focus-visible,
.auth-form .btn:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 640px) {
    .screen-content#auth-container {
        padding: 1rem;
    }
    
    .logo-container .app-title {
        font-size: 2rem;
    }
    
    .auth-form {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .auth-tabs {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
    }
    
    .tab-btn.active::after {
        display: none;
    }
    
    .tab-btn.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .form-group input {
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }
}

/* Tablet Anpassungen */
@media (min-width: 641px) and (max-width: 1024px) {
    .screen-content#auth-container {
        max-width: 600px;
    }
    
    .auth-form {
        max-width: 480px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .auth-form {
        border: 2px solid #1f2937;
    }
    
    .form-group input {
        border-width: 2px;
    }
    
    .tab-btn.active {
        border: 2px solid #6366f1;
    }
}

/* Print Styles */
@media print {
    .auth-tabs,
    .form-footer {
        display: none;
    }
}

/* Special Styling for Demo Mode */
.demo-badge {
    display: inline-block;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: #ef4444;
}

.password-strength-bar.medium {
    width: 66%;
    background: #f59e0b;
}

.password-strength-bar.strong {
    width: 100%;
    background: #10b981;
}

/* ============================================= */
/* ENDE AUTH.CSS                                 */
/* ============================================= */