﻿/* E+H Design System Variablen */
:root {
    --eh-font-family: 'E+H Sans', 'Arial', sans-serif;
    --eh-color-primary: #7B0040;
    --eh-color-primary-light: #E6ECF0;
    --eh-color-primary-dark: #7B0040;
    --eh-color-primary-hover: #9B1A5A;
    --eh-color-text-primary: #333;
    --eh-color-text-secondary: #555;
    --eh-color-text-inverse: #fff;
    --eh-color-background: #fff;
    --eh-color-background-active: #fff;
    --eh-color-border: #e1e5e9;
    --eh-color-error: #c62828;
    --eh-color-error-light: #ffebee;
    --eh-color-error-border: #ffcdd2;
    --eh-border-radius: 8px;
    --eh-border-radius-small: 4px;
    --eh-spacing-small: 0.75rem;
    --eh-spacing-medium: 1rem;
    --eh-font-size-small: 0.875rem;
    --eh-font-size-base: 1rem;
    --eh-font-weight-light: 300;
    --eh-font-weight-medium: 500;
    --eh-font-weight-semibold: 600;
    --eh-shadow-small: 0 2px 4px rgba(123, 0, 64, 0.2);
    --eh-shadow-medium: 0 4px 12px rgba(123, 0, 64, 0.3);
    --eh-shadow-large: 0 10px 30px rgba(0,0,0,0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--eh-font-family);
    height: 100vh;
    overflow: hidden;
}

/* Desktop Layout */
.container {
    display: flex;
    min-height: 100vh;
}

.image-section {
    flex: 2;
    background: url('../media/content.jpg') center/cover; /* ✅ KORRIGIERT: ../../ zu ../ */
    position: relative;
}

.login-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--eh-color-primary-light, #E6ECF0) 0%, var(--eh-color-primary-dark, #7B0040) 100%);
    padding: 2rem;
    position: relative;
    min-width: 400px;
    overflow: hidden;
}

.login-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
            radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 2px, transparent 2px),
            radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px;
    pointer-events: none;
}

.logo-container {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.logo {
    max-height: 80px;
    width: auto;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 1;
}

.login-form {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: var(--eh-border-radius, 8px);
    box-shadow: var(--eh-shadow-large, 0 10px 30px rgba(0,0,0,0.2));
}

.login-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--eh-color-text-primary, #333);
    font-size: 2rem;
    font-weight: var(--eh-font-weight-light, 300);
}

/* Endress+Hauser Form Group */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--eh-color-text-secondary, #555);
    font-weight: var(--eh-font-weight-medium, 500);
    font-size: var(--eh-font-size-small, 0.875rem);
}

/* Endress+Hauser Input Styling */
.form-input {
    width: 100%;
    padding: var(--eh-spacing-medium, 1rem);
    border: 2px solid var(--eh-color-border, #e1e5e9);
    border-radius: var(--eh-border-radius-small, 4px);
    font-size: var(--eh-font-size-base, 1rem);
    font-family: var(--eh-font-family, inherit);
    transition: all 0.3s ease;
    background: var(--eh-color-background, #fff);
    color: var(--eh-color-text-primary, #333);
}

.form-input:focus {
    outline: none;
    border-color: var(--eh-color-primary, #7B0040);
    box-shadow: 0 0 0 3px rgba(123, 0, 64, 0.1);
    background: var(--eh-color-background-active, #fff);
}

.form-input:hover {
    border-color: var(--eh-color-primary-hover, #9B1A5A);
}

/* Endress+Hauser Button */
.login-button {
    width: 100%;
    padding: var(--eh-spacing-medium, 1rem);
    background: var(--eh-color-primary, #7B0040);
    color: var(--eh-color-text-inverse, #fff);
    border: none;
    border-radius: var(--eh-border-radius-small, 4px);
    font-size: var(--eh-font-size-base, 1rem);
    font-weight: var(--eh-font-weight-medium, 600);
    font-family: var(--eh-font-family, inherit);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-button:hover {
    background: var(--eh-color-primary-hover, #9B1A5A);
    transform: translateY(-1px);
    box-shadow: var(--eh-shadow-medium, 0 4px 12px rgba(123, 0, 64, 0.3));
}

.login-button:active {
    transform: translateY(0);
    box-shadow: var(--eh-shadow-small, 0 2px 4px rgba(123, 0, 64, 0.2));
}

.login-button:focus {
    outline: 2px solid var(--eh-color-primary-light, #E6ECF0);
    outline-offset: 2px;
}

/* Endress+Hauser Error Message */
.error-message {
    background: var(--eh-color-error-light, #ffebee);
    color: var(--eh-color-error, #c62828);
    padding: var(--eh-spacing-small, 0.75rem);
    border-radius: var(--eh-border-radius-small, 4px);
    margin-bottom: 1rem;
    border: 1px solid var(--eh-color-error-border, #ffcdd2);
    text-align: center;
    font-size: var(--eh-font-size-small, 0.875rem);
}

/* Mobile Responsive CSS */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        min-height: 100vh;
    }

    .image-section {
        flex: none;
        height: 30vh;
        min-height: 200px;
    }

    .login-section {
        flex: 1;
        min-width: auto;
        padding: 1rem;
        justify-content: flex-start;
        padding-top: 2rem;
    }

    .login-form {
        max-width: 100%;
        margin: 0;
        padding: 1.5rem;
    }

    .login-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .form-input {
        padding: 0.75rem;
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }

    .login-button {
        padding: 0.75rem;
        font-size: 1rem;
    }

    .logo-container {
        position: static;
        transform: none;
        margin-top: 1rem;
        text-align: center;
    }

    .logo {
        max-height: 60px;
    }
}

/* Sehr kleine Bildschirme */
@media (max-width: 480px) {
    .login-section {
        padding: 0.5rem;
    }

    .login-form {
        padding: 1rem;
    }

    .login-title {
        font-size: 1.25rem;
    }

    .image-section {
        height: 25vh;
        min-height: 150px;
    }
}

/* Touch-optimierte Eingabefelder */
@media (max-width: 768px) {
    .form-input,
    .login-button {
        min-height: 44px; /* Apple's empfohlene Touch-Größe */
    }
}