/* LOGIN SYSTEM STYLING */
/* ===================== */

/* RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #c62828; /* Rosso Rot Hintergrund */
    color: #2c3e50;
    overflow: auto;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    -webkit-font-smoothing: antialiased;
}

body.modal-open {
    overflow: hidden;
}

/* LOGIN CONTAINER */
.login-container {
    width: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available; /* iOS Safari fix */
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #c62828; /* Rosso Rot Hintergrund */
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Mobile Optimierungen */
    touch-action: pan-y; /* Nur vertikales Scrollen erlauben */
    -webkit-tap-highlight-color: transparent;
}

/* FORM CONTAINER - DIESES EINE MODAL BEHÄLT ALLE INHALTE */
.login-form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 480px; /* Etwas breiter für bessere Lesbarkeit */
    max-height: 95vh;
    overflow-y: auto; /* Ermöglicht Scrollen innerhalb des Containers */
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
    position: relative; /* WICHTIG: relative Positionierung */
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(198, 40, 40, 0.3) transparent;
}

/* HEADER */
.login-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

/* FORM CONTAINER - DIESES EINE MODAL BEHÄLT ALLE INHALTE */
.login-form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 480px; /* Etwas breiter für bessere Lesbarkeit */
    max-height: 95vh;
    overflow-y: auto; /* Ermöglicht Scrollen innerhalb des Containers */
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
    position: relative; /* WICHTIG: relative Positionierung */
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(198, 40, 40, 0.3) transparent;
}

/* SICHERSTELLEN, dass alle Inhalte innerhalb des Containers bleiben */
.login-form-container > * {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Start-Screen und Form-Content müssen im gleichen Container sein */
.start-screen,
.form-content {
    width: 100%;
    box-sizing: border-box;
}

/* Versteckte Elemente wirklich verstecken */
.start-screen[style*="display: none"],
.form-content[style*="display: none"] {
    display: none !important;
}

/* START SCREEN */
.start-screen {
    padding: 0 10px 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
}

.start-screen .modal-logo {
    padding-top: 20px;
}

/* MODAL LOGO */
.modal-logo {
    text-align: center;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.modal-logo-img {
    width: 100%;
    max-width: 90px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Register-Seite: Logo als Bild, nicht als Text */
#registerFormContainer .form-header .modal-logo-img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    max-width: 220px !important;
    max-height: 100px !important;
    object-fit: contain !important;
}

#registerFormContainer .form-header .modal-logo-img::before,
#registerFormContainer .form-header .modal-logo-img::after {
    display: none !important;
    content: none !important;
}

/* Sicherstellen, dass das Logo-Container das Bild enthält */
#registerFormContainer .form-header .modal-logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#registerFormContainer .form-header .modal-logo::before,
#registerFormContainer .form-header .modal-logo::after {
    display: none !important;
    content: none !important;
}

.action-button {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px; /* Größere Schrift für bessere Lesbarkeit */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    min-height: 48px; /* Touch-freundlich - mindestens 44px empfohlen */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); /* Touch-Feedback */
}

.action-button.primary {
    background: #4caf50; /* Grün wie im Referenzbild */
    color: white;
}

.action-button.primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.3);
}

.action-button.primary:active {
    background: #3d8b40;
    transform: translateY(0);
}

.action-button.secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.action-button.secondary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.2);
}

/* FORM CONTENT - Zentriert und symmetrisch */
.form-content {
    padding: 40px 40px 30px 40px;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch !important; /* Stretch für volle Breite der Felder */
    overflow: visible; /* Kein Overflow, damit alles sichtbar ist */
    position: relative;
    min-height: fit-content; /* Mindesthöhe passt sich dem Inhalt an */
}

/* Sicherstellen, dass form-content IMMER sichtbar ist (außer explizit versteckt) */
#loginFormContainer,
#registerFormContainer {
    display: flex !important;
}

/* FORM HEADER - Logo zentriert */
.form-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 32px;
    position: relative;
    text-align: center;
    gap: 16px;
}

/* BACK BUTTON - Links im Header */
.form-header .back-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
    position: relative;
}

.form-header .back-button:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-header .back-button:active {
    background: #dee2e6;
    transform: translateY(0);
}

.form-header .back-button svg {
    width: 20px;
    height: 20px;
    color: #6c757d;
    transition: all 0.2s ease;
}

.form-header .back-button:hover svg {
    color: #495057;
}

/* LOGO - Zentriert im Header */
.form-header .modal-logo {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 0 16px 0 !important;
    gap: 0;
    width: 100%;
}

.form-header .modal-logo-img {
    max-width: 220px;
    max-height: 100px;
    height: auto;
    object-fit: contain;
    display: block !important;
    margin: 0 auto;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Form Title im Header */
.form-header .form-title {
    font-size: 16px;
    font-weight: 400;
    color: #2c3e50;
    margin: 0;
    padding: 0;
    text-align: center;
    line-height: 1.5;
}

/* Register-Seite: Logo als Bild, nicht als Text */
#registerFormContainer .form-header .modal-logo-img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    content: none !important;
}

#registerFormContainer .form-header .modal-logo-img::before,
#registerFormContainer .form-header .modal-logo-img::after {
    display: none !important;
    content: none !important;
}

/* Login Subtitle unter dem Logo */
.login-subtitle {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    margin: 0;
    padding: 0;
    line-height: 1.4;
    font-weight: 400;
    width: 100%;
    display: block;
}

/* Form Title und Description */
.form-title {
    font-size: 20px;
    font-weight: 500;
    color: #495057;
    text-align: center;
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.register-form .form-title {
    margin-bottom: 24px;
}

.form-description {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    margin: 0 0 20px 0;
    padding: 0;
    line-height: 1.6;
}

/* Header Spacer für symmetrische Ausrichtung */
.header-spacer {
    width: 44px;
    flex-shrink: 0;
    visibility: hidden;
}

/* FORM STYLES - Zentriert, volle Breite, vertikale Anordnung */
.login-form,
.register-form {
    width: 100% !important;
    max-width: 100%;
    border: none !important; /* Keine rote Umrandung */
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    align-items: stretch !important;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.form-group {
    margin-bottom: 0;
    width: 100%;
}

/* Form Labels */
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #6c757d;
    margin-bottom: 6px;
    text-align: left;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    padding-right: 50px; /* Platz für das Auge-Icon am Ende */
    border: none;
    border-bottom: 2px solid #e9ecef;
    border-radius: 0;
    font-size: 16px; /* 16px verhindert Auto-Zoom auf iOS */
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
    box-sizing: border-box;
    min-height: 48px; /* Touch-freundlich */
    -webkit-appearance: none; /* Entfernt iOS-Standard-Styling */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* Gelber Hintergrund für ausgefüllte Felder (wie im Referenzbild) */
.form-group input[type="email"]:not(:placeholder-shown),
.form-group input[type="password"]:not(:placeholder-shown),
.form-group input[type="text"]:not(:placeholder-shown) {
    background: #fff9c4; /* Hellgelb wie im Referenzbild */
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus {
    background: #fff9c4; /* Gelber Hintergrund auch beim Fokus */
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-bottom-color: #c62828; /* Rosso Rot für Fokus */
    background: #fff9c4; /* Gelber Hintergrund beim Fokus */
    box-shadow: none;
}

/* E-Mail-Feld braucht kein extra Padding rechts (kein Auge-Icon) */
.form-group input[type="email"] {
    padding-right: 16px;
}

.form-content .action-button {
    margin-top: 0 !important;
    width: 100% !important;
    align-self: stretch !important;
}

.form-group input::placeholder {
    color: #adb5bd;
}

/* PASSWORD INPUT CONTAINER */
.password-input-container {
    position: relative;
    /* Verhindert, dass Hover-Effekte das Icon beeinflussen */
    isolation: isolate;
}

.password-input-container:hover .password-toggle {
    /* Keine Änderungen beim Hover über das Input-Feld */
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
    color: #495057;
    z-index: 10;
    pointer-events: auto !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    transition: none !important;
}

.password-toggle:hover {
    color: #c62828; /* Rosso Rot */
}

.password-toggle:active {
    color: #b71c1c;
    opacity: 0.9;
}

.eye-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none !important;
    display: block;
    flex-shrink: 0;
    transition: none !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.eye-icon-hidden {
    display: block !important;
}

.eye-icon-visible {
    display: none !important;
}

/* CHECKBOX STYLES - Separates Viereck links, Label rechts - nebeneinander, gleiche Größe, zentriert */
.checkbox-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    justify-content: flex-start !important; /* Links ausrichten */
    height: auto !important;
    flex-wrap: nowrap !important; /* Verhindert Zeilenumbruch */
}

/* Checkbox und Button vertikal angeordnet (Login) - Loyverse Style */
.checkbox-button-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    margin-top: 8px !important;
    width: 100% !important;
}

.login-submit-btn {
    width: 100% !important;
    margin: 0 !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
}

/* Sicherstellen, dass Checkbox und Label wirklich nebeneinander sind */
.checkbox-group > * {
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Checkbox als separates Viereck - Überschreibt alle inline-Styles */
.remember-checkbox {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 2px solid #ced4da !important;
    border-radius: 5px !important;
    background: white !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    position: relative !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    display: inline-block !important;
    outline: none !important;
    overflow: visible !important;
    font-size: 18px !important; /* Für den Haken */
}

.remember-checkbox:hover {
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.remember-checkbox:checked {
    background: #4caf50 !important; /* Grün wie im Referenzbild */
    border-color: #4caf50 !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.25) !important;
}

.remember-checkbox:checked::after {
    content: '\2713' !important; /* Unicode Checkmark ✓ */
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 18px !important;
    font-weight: bold !important;
    line-height: 24px !important;
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    text-align: center !important;
    z-index: 10 !important;
    pointer-events: none !important;
    font-family: Arial, sans-serif !important;
}

/* Label-Text rechts neben der Checkbox - gleiche Höhe wie Checkbox */
.checkbox-label-text {
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    user-select: none;
    line-height: 24px !important; /* Gleiche Höhe wie Checkbox (24px) */
    height: 24px !important; /* Gleiche Höhe wie Checkbox */
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important; /* Inline-Block für nebeneinander */
    align-items: center !important;
    vertical-align: middle !important;
    flex: 0 0 auto !important; /* Nicht flexibel, nur so groß wie nötig */
    white-space: nowrap; /* Verhindert Zeilenumbruch */
}

/* SUBMIT BUTTON */
.submit-button {
    width: 100%;
    padding: 14px 20px;
    min-height: 48px; /* Touch-freundlich */
    background: #c62828; /* Rosso Rot */
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px; /* Größere Schrift für mobile */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.submit-button:hover {
    background: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(198, 40, 40, 0.3);
}

.submit-button:active {
    background: #a01515;
    transform: translateY(0);
}


.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* LOADING SPINNER */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* FORM LINKS - Loyverse Style (zentriert) */
.form-links-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
}

.form-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center; /* Zentriert */
    text-align: center;
}

.form-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    display: block;
    text-align: center;
    padding: 0;
    margin: 0;
}

.form-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Sprachauswahl inline - Loyverse Style (zentriert) */
.language-selector-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    width: 100%;
    margin-top: 8px; /* Extra Abstand nach oben */
    padding-bottom: 8px; /* Extra Padding unten */
}

.language-label {
    font-size: 13px;
    color: #6c757d;
    text-align: center;
    white-space: nowrap;
}

.language-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    color: #495057;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    min-width: 120px;
}

.language-select:hover {
    border-color: #667eea;
}

.language-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Country Select */
.country-select {
    width: 100%;
    padding: 14px 16px;
    padding-right: 40px;
    border: none;
    border-bottom: 2px solid #e9ecef;
    border-radius: 0;
    font-size: 16px;
    background: white;
    cursor: pointer;
    color: #495057;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23495057' d='M8 12L2 6h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    box-sizing: border-box;
    min-height: 48px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.country-select:not([value=""]) {
    background: #fff9c4; /* Gelber Hintergrund wenn ausgefüllt */
}

.country-select:focus {
    border-bottom-color: #c62828;
    background: #fff9c4;
    outline: none;
}

.country-select:hover {
    border-bottom-color: #c62828;
}

/* Register Button Row - Loyverse Style (vollbreitig) */
.register-button-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    margin-top: 16px;
}

.register-submit-btn {
    width: 100%;
    margin: 0;
}

/* Register Login Link */
.register-login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #6c757d;
}

.register-login-link .login-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.register-login-link .login-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* MODAL OVERLAY */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay[style*="display: flex"] {
    display: flex !important;
}

.modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    max-height: 98vh;
    min-height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    position: relative;
    /* Scrollbar verstecken */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE und Edge */
}

.modal-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.modal-header {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 16px 16px 0 16px;
    border-bottom: none;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #6c757d;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.modal-body {
    padding: 24px;
    padding-bottom: 32px;
    text-align: center;
    overflow-y: visible;
    overflow-x: hidden;
    flex: 1;
    /* Scrollbar verstecken */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE und Edge */
}

.modal-body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.modal-body .modal-logo {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-body .modal-logo-img {
    max-width: 220px;
    max-height: 100px;
    height: auto;
    object-fit: contain;
    display: block;
}

.modal-title {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.modal-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
    box-sizing: border-box;
    min-height: 48px;
}

.modal-body .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-body .action-button {
    width: 100%;
    margin-top: 0;
}

.modal-footer {
    margin-top: 24px;
    margin-bottom: 0;
    padding-top: 16px;
    text-align: center;
    flex-shrink: 0;
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 8px;
}

.btn-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Erfolgs-Modal Styles */
.success-icon {
    margin: 16px 0 24px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: successIconAnimation 0.5s ease-out;
}

@keyframes successIconAnimation {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.modal-actions .action-button {
    min-width: 150px;
}

/* STATUS MESSAGES */
.status-messages {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 400px;
    width: 90%;
}

.status-message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideDown 0.3s ease;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* DEVICE STATUS */
.device-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 15px;
    max-width: 300px;
    animation: slideUp 0.3s ease;
}

.device-status-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.device-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: white;
    padding: 5px;
}

.device-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.device-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 4px 0;
}

.device-info p {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FOOTER */
.login-footer {
    position: relative;
    margin-top: 20px;
    text-align: center;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    width: 100%;
}

.login-footer p {
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* Footer-Sprachauswahl-Styles entfernt - Sprachauswahl ist jetzt nur im Modal */


/* ============================================
   MOBILE-FIRST RESPONSIVE DESIGN
   ============================================ */

/* HANDY - Portrait (bis 480px) */
@media (max-width: 480px) {
    .login-container {
        padding: 10px;
        min-height: 100vh;
        min-height: -webkit-fill-available; /* iOS fix */
    }
    
    .login-form-container {
        max-width: 100%;
        width: 100%;
        border-radius: 15px;
        max-height: 90vh; /* Mehr Platz für Scrollen */
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .form-content {
        padding: 20px 15px 50px 15px !important; /* Mehr Padding unten für language-selector */
        gap: 16px !important;
        min-height: fit-content;
    }
    
    /* Logo etwas größer auf Handy */
    .modal-logo-img {
        max-width: 110px !important;
        max-height: 100px !important;
    }
    
    .form-links {
        margin-top: 16px !important;
        gap: 10px !important;
    }
    
    .form-links a {
        font-size: 0.9rem !important;
    }
    
    .form-header {
        margin-bottom: 8px !important;
    }
    
    .form-header .back-button {
        width: 40px !important;
        height: 40px !important;
    }
    
    .form-header .back-button svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    .form-header .modal-logo-img {
        max-width: 90px !important;
        max-height: 50px !important;
    }
    
    .login-subtitle {
        font-size: 11px !important;
    }
    
    .header-spacer {
        width: 40px !important;
    }
    
    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="text"] {
        padding: 14px 16px !important;
        font-size: 16px !important; /* Verhindert Zoom auf iOS */
        min-height: 48px !important; /* Touch-freundlich */
    }
    
    .action-button,
    .submit-button {
        padding: 14px 20px !important;
        font-size: 16px !important;
        min-height: 48px !important; /* Touch-freundlich */
        border-radius: 10px !important;
    }
    
    .password-toggle {
        width: 48px !important;
        height: 48px !important; /* Größer für bessere Sichtbarkeit */
        right: 8px !important;
    }
    
    .eye-icon {
        width: 26px !important;
        height: 26px !important;
    }
    
    .remember-checkbox {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        min-height: 22px !important;
        max-width: 22px !important;
        max-height: 22px !important;
    }
    
    .remember-checkbox:checked::after {
        font-size: 14px !important;
    }
    
    .checkbox-label-text {
        font-size: 14px !important;
        line-height: 22px !important; /* Gleiche Höhe wie Checkbox (22px) */
        height: 22px !important; /* Gleiche Höhe wie Checkbox */
    }
    
    .login-footer {
        padding: 15px 10px !important;
        font-size: 12px !important;
    }
    
    .footer-links {
        flex-direction: column !important;
        gap: 8px !important;
        font-size: 12px !important;
    }
}

/* HANDY - Landscape (480px - 768px, Querformat) */
@media (min-width: 481px) and (max-width: 768px) and (orientation: landscape) {
    .login-container {
        padding: 10px;
    }
    
    .login-form-container {
        max-width: 90%;
        max-height: 95vh;
    }
    
    .modal-logo-img {
        width: 70px !important;
        max-height: 60px !important;
    }
    
    .start-screen,
    .form-content {
        padding: 10px 15px 15px 15px !important;
        gap: 12px !important;
    }
    
    .form-group input {
        padding: 12px 14px !important;
        font-size: 16px !important;
        min-height: 44px !important;
    }
    
    .action-button,
    .submit-button {
        padding: 12px 18px !important;
        font-size: 15px !important;
        min-height: 44px !important;
    }
}

/* TABLET 10 ZOLL - Portrait (768px - 1024px) */
/* iPad (10.2"), Android 10" Tablets im Hochformat */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .login-container {
        padding: 20px;
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    .login-form-container {
        max-width: 550px; /* Optimale Breite für 10-Zoll-Tablet */
        width: 100%;
        border-radius: 20px;
        max-height: 90vh; /* Mehr Platz für Scrollen */
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .form-content {
        padding: 30px 35px 50px 35px !important; /* Mehr Padding unten für language-selector */
        gap: 22px !important;
        min-height: fit-content;
    }
    
    .form-header {
        margin-bottom: 12px !important;
    }
    
    /* Logo größer auf Tablet */
    .modal-logo-img {
        max-width: 140px !important;
        max-height: 120px !important;
        width: auto !important;
        height: auto !important;
    }
    
    .form-header .back-button {
        width: 48px !important;
        height: 48px !important;
    }
    
    .form-header .back-button svg {
        width: 22px !important;
        height: 22px !important;
    }
    
    .form-header .modal-logo-img {
        max-width: 150px !important;
        max-height: 80px !important;
    }
    
    .login-subtitle {
        font-size: 13px !important;
    }
    
    .header-spacer {
        width: 48px !important;
    }
    
    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="text"] {
        padding: 16px 20px !important;
        font-size: 17px !important; /* Etwas größer für Tablet */
        min-height: 54px !important; /* Größer für bequeme Touch-Bedienung */
        border-radius: 12px !important;
    }
    
    .action-button,
    .submit-button {
        padding: 16px 28px !important;
        font-size: 17px !important;
        min-height: 54px !important;
        border-radius: 12px !important;
    }
    
    .password-toggle {
        width: 52px !important;
        height: 52px !important;
        right: 10px !important;
    }
    
    .eye-icon {
        width: 30px !important;
        height: 30px !important;
    }
    
    .remember-checkbox {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
        max-width: 26px !important;
        max-height: 26px !important;
    }
    
    .remember-checkbox:checked::after {
        font-size: 18px !important;
    }
    
    .checkbox-label-text {
        font-size: 16px !important;
        line-height: 26px !important; /* Gleiche Höhe wie Checkbox (26px) */
        height: 26px !important; /* Gleiche Höhe wie Checkbox */
    }
    
    .login-footer {
        padding: 20px !important;
        font-size: 14px !important;
    }
}

/* TABLET 10 ZOLL - Landscape (1024px - 1366px, Querformat) */
/* iPad (10.2"), Android 10" Tablets im Querformat */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
    .login-container {
        padding: 20px;
    }
    
    .login-form-container {
        max-width: 650px; /* Etwas breiter im Landscape */
        max-height: 95vh;
        border-radius: 20px;
    }
    
    .modal-logo-img {
        width: 120px !important;
        max-width: 120px !important;
        max-height: 100px !important;
        margin: 20px 0 15px 0 !important;
    }
    
    .start-screen,
    .form-content {
        padding: 20px 30px 25px 30px !important;
        gap: 20px !important;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-group input {
        padding: 15px 18px !important;
        font-size: 16px !important;
        min-height: 52px !important;
        border-radius: 12px !important;
    }
    
    .action-button,
    .submit-button {
        padding: 15px 26px !important;
        font-size: 16px !important;
        min-height: 52px !important;
        border-radius: 12px !important;
    }
    
    .password-toggle {
        width: 50px !important;
        height: 50px !important;
        right: 10px !important;
    }
    
    .eye-icon {
        width: 28px !important;
        height: 28px !important;
    }
    
    .back-button {
        top: 12px !important;
        left: 15px !important;
        padding: 11px 15px !important;
        font-size: 15px !important;
        min-height: 46px !important;
    }
    
    .form-content {
        padding: 65px 20px 20px 20px !important; /* Angepasstes Padding oben */
    }
    
    .checkbox-label {
        padding: 15px !important;
        font-size: 15px !important;
        min-height: 52px !important;
    }
    
    .checkmark {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        max-width: 24px !important;
        max-height: 24px !important;
        aspect-ratio: 1 / 1 !important;
    }
}

/* TABLET 10 ZOLL - Alternative Landscape (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: landscape) {
    .login-container {
        padding: 15px;
    }
    
    .login-form-container {
        max-width: 600px;
        max-height: 90vh; /* Mehr Platz für Scrollen */
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-logo-img {
        width: 120px !important;
        max-width: 120px !important;
        max-height: 100px !important;
    }
    
    .start-screen,
    .form-content {
        padding: 15px 25px 50px 25px !important; /* Mehr Padding unten */
        gap: 18px !important;
        min-height: fit-content;
    }
    
    .form-group input {
        padding: 14px 17px !important;
        font-size: 16px !important;
        min-height: 50px !important;
    }
    
    .action-button,
    .submit-button {
        padding: 14px 24px !important;
        font-size: 16px !important;
        min-height: 50px !important;
    }
}

/* DESKTOP - ab 1025px */
@media (min-width: 1025px) {
    .login-form-container {
        max-width: 450px;
    }
}

/* RESPONSIVE DESIGN - LANDSCAPE (QUERFORMAT) - MUSS NACH ANDEREN MEDIA QUERIES KOMMEN */
/* Für alle Geräte im Querformat (Handy, Tablet, Desktop) */
/* Verwendet sowohl Media Query als auch JavaScript-Klasse für maximale Kompatibilität */
@media (orientation: landscape), (min-width: 768px) and (max-height: 600px) {
    .login-container {
        padding: 5px !important;
        justify-content: flex-start !important;
        padding-top: 5px !important;
        min-height: 100vh !important;
        height: auto !important;
        overflow-y: auto !important;
    }
    
    .login-form-container {
        max-width: 50% !important;
        max-height: 98vh !important;
        margin: 0 auto !important;
        width: 100% !important;
        border-radius: 12px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        position: relative !important;
    }
    
    .modal-logo {
        padding: 2px 0 1px 0 !important;
        margin: 0 !important;
    }
    
    .modal-logo-img {
        width: 50px !important;
        height: 50px !important;
        max-width: 50px !important;
        max-height: 50px !important;
        margin: 0 !important;
    }
    
    .login-subtitle {
        font-size: 10px !important;
    }
    
    .form-tabs {
        flex-shrink: 0 !important;
        margin-top: 0 !important;
    }
    
    .tab-button {
        padding: 5px !important;
        font-size: 0.8rem !important;
    }
    
    .tab-content {
        padding: 6px 10px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        max-height: calc(98vh - 100px) !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        position: relative !important;
    }
    
    .form-group {
        margin-bottom: 6px !important;
    }
    
    .form-group label {
        font-size: 0.7rem !important;
        margin-bottom: 2px !important;
    }
    
    .form-group input {
        padding: 5px 8px !important;
        font-size: 0.75rem !important;
        height: auto !important;
        min-height: 32px !important;
    }
    
    .submit-button {
        padding: 6px !important;
        font-size: 0.85rem !important;
        margin-top: 2px !important;
        min-height: 32px !important;
    }
    
    .checkbox-group {
        margin-bottom: 6px !important;
    }
    
    .checkbox-label {
        padding: 3px 5px !important;
        font-size: 0.7rem !important;
    }
    
    .checkmark {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        max-width: 20px !important;
        max-height: 20px !important;
        aspect-ratio: 1 / 1 !important;
        margin-right: 8px !important;
    }
    
    .form-links {
        margin-top: 3px !important;
    }
    
    .form-links a {
        font-size: 0.7rem !important;
    }
    
    .password-toggle {
        padding: 3px !important;
        right: 8px !important;
    }
    
    .eye-icon {
        width: 22px !important;
        height: 22px !important;
    }
    
    .login-footer {
        position: relative !important;
        bottom: auto !important;
        margin-top: 2px !important;
        font-size: 0.6rem !important;
        padding: 2px 0 !important;
    }
    
    .footer-links {
        gap: 6px !important;
        font-size: 0.6rem !important;
    }
}

/* Alternative: JavaScript-basierte Erkennung für bessere Kompatibilität */
/* Funktioniert auch mit data-attribute für Firefox */
body.landscape-mode .login-container,
html.landscape-mode .login-container,
body[data-orientation="landscape"] .login-container {
    padding: 5px !important;
    justify-content: flex-start !important;
    padding-top: 5px !important;
    min-height: 100vh !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

body.landscape-mode .login-form-container,
html.landscape-mode .login-form-container,
body[data-orientation="landscape"] .login-form-container {
    max-width: 50% !important;
    max-height: 98vh !important;
    margin: 0 auto !important;
    width: 100% !important;
    border-radius: 12px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    position: relative !important;
}

body.landscape-mode .modal-logo,
html.landscape-mode .modal-logo,
body[data-orientation="landscape"] .modal-logo {
    padding: 2px 0 1px 0 !important;
    margin: 0 !important;
}

body.landscape-mode .modal-logo-img,
html.landscape-mode .modal-logo-img,
body[data-orientation="landscape"] .modal-logo-img {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    margin: 0 !important;
}

body.landscape-mode .login-subtitle,
html.landscape-mode .login-subtitle,
body[data-orientation="landscape"] .login-subtitle {
    font-size: 10px !important;
}

body.landscape-mode .form-tabs,
html.landscape-mode .form-tabs,
body[data-orientation="landscape"] .form-tabs {
    flex-shrink: 0 !important;
    margin-top: 0 !important;
}

body.landscape-mode .tab-button,
html.landscape-mode .tab-button,
body[data-orientation="landscape"] .tab-button {
    padding: 5px !important;
    font-size: 0.8rem !important;
}

body.landscape-mode .tab-content,
html.landscape-mode .tab-content,
body[data-orientation="landscape"] .tab-content {
    padding: 6px 10px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: calc(98vh - 100px) !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    position: relative !important;
}

body.landscape-mode .form-group,
html.landscape-mode .form-group {
    margin-bottom: 6px !important;
}

body.landscape-mode .form-group label,
html.landscape-mode .form-group label {
    font-size: 0.7rem !important;
    margin-bottom: 2px !important;
}

body.landscape-mode .form-group input,
html.landscape-mode .form-group input {
    padding: 5px 8px !important;
    font-size: 0.75rem !important;
    height: auto !important;
    min-height: 32px !important;
}

body.landscape-mode .submit-button,
html.landscape-mode .submit-button {
    padding: 6px !important;
    font-size: 0.85rem !important;
    margin-top: 2px !important;
    min-height: 32px !important;
}

body.landscape-mode .checkbox-group,
html.landscape-mode .checkbox-group {
    margin-bottom: 6px !important;
}

body.landscape-mode .checkbox-label,
html.landscape-mode .checkbox-label {
    padding: 3px 5px !important;
    font-size: 0.7rem !important;
}

body.landscape-mode .checkmark,
html.landscape-mode .checkmark {
    width: 12px !important;
    height: 12px !important;
    margin-right: 5px !important;
}

body.landscape-mode .form-links,
html.landscape-mode .form-links {
    margin-top: 3px !important;
}

body.landscape-mode .form-links a,
html.landscape-mode .form-links a {
    font-size: 0.7rem !important;
}

body.landscape-mode .password-toggle,
html.landscape-mode .password-toggle {
    padding: 3px !important;
    right: 8px !important;
}

body.landscape-mode .eye-icon,
html.landscape-mode .eye-icon {
    width: 22px !important;
    height: 22px !important;
}

body.landscape-mode .login-footer,
html.landscape-mode .login-footer {
    position: relative !important;
    bottom: auto !important;
    margin-top: 2px !important;
    font-size: 0.6rem !important;
    padding: 2px 0 !important;
}

body.landscape-mode .footer-links,
html.landscape-mode .footer-links {
    gap: 6px !important;
    font-size: 0.6rem !important;
}

/* Spezifische Anpassung für Tablets im Querformat */
@media (orientation: landscape) and (min-width: 768px) and (min-height: 500px) {
    .login-form-container {
        max-width: 40% !important;
    }
    
    .modal-logo-img {
        width: 70px !important;
        height: 70px !important;
        max-width: 70px !important;
        max-height: 70px !important;
    }
    
    .tab-content {
        padding: 10px 15px !important;
    }
    
    .form-group input {
        padding: 7px 10px !important;
        font-size: 0.8rem !important;
    }
    
    .submit-button {
        padding: 10px !important;
        font-size: 0.9rem !important;
    }
}

/* Firefox-spezifische Anpassungen für Landscape */
@-moz-document url-prefix() {
    /* Media Query für Firefox */
    @media (orientation: landscape), (min-width: 768px) and (max-height: 600px) {
        .login-container {
            padding: 5px !important;
            justify-content: flex-start !important;
            padding-top: 5px !important;
            overflow-y: scroll !important;
        }
        
        .login-form-container {
            max-width: 50% !important;
            max-height: 98vh !important;
            overflow-y: scroll !important;
            display: block !important;
        }
        
        .modal-logo-img {
            width: 50px !important;
            height: 50px !important;
            max-width: 50px !important;
            max-height: 50px !important;
        }
        
        .login-subtitle {
            font-size: 10px !important;
        }
        
        .modal-logo {
            padding: 2px 0 1px 0 !important;
        }
        
        .tab-button {
            padding: 5px !important;
            font-size: 0.8rem !important;
        }
        
        .tab-content {
            padding: 6px 10px !important;
            overflow-y: scroll !important;
            max-height: calc(98vh - 100px) !important;
            display: block !important;
        }
        
        .form-group {
            margin-bottom: 6px !important;
        }
        
        .form-group input {
            padding: 5px 8px !important;
            font-size: 0.75rem !important;
            min-height: 32px !important;
        }
        
        .submit-button {
            padding: 6px !important;
            font-size: 0.85rem !important;
            min-height: 32px !important;
        }
    }
    
    /* JavaScript-Klasse für Firefox */
    body.landscape-mode .login-container,
    html.landscape-mode .login-container,
    body[data-orientation="landscape"] .login-container {
        padding: 5px !important;
        justify-content: flex-start !important;
        padding-top: 5px !important;
        overflow-y: scroll !important;
    }
    
    body.landscape-mode .login-form-container,
    html.landscape-mode .login-form-container,
    body[data-orientation="landscape"] .login-form-container {
        max-width: 50% !important;
        max-height: 98vh !important;
        overflow-y: scroll !important;
    }
    
    body.landscape-mode .modal-logo-img,
    html.landscape-mode .modal-logo-img,
    body[data-orientation="landscape"] .modal-logo-img {
        width: 50px !important;
        height: 50px !important;
        max-width: 50px !important;
        max-height: 50px !important;
    }
    
    body.landscape-mode .login-subtitle,
    html.landscape-mode .login-subtitle,
    body[data-orientation="landscape"] .login-subtitle {
        font-size: 10px !important;
    }
    
    body.landscape-mode .tab-content,
    html.landscape-mode .tab-content,
    body[data-orientation="landscape"] .tab-content {
        padding: 6px 10px !important;
        overflow-y: scroll !important;
        max-height: calc(98vh - 100px) !important;
    }
    
    body.landscape-mode .form-group input,
    html.landscape-mode .form-group input,
    body[data-orientation="landscape"] .form-group input {
        padding: 5px 8px !important;
        font-size: 0.75rem !important;
        min-height: 32px !important;
    }
    
    body.landscape-mode .submit-button,
    html.landscape-mode .submit-button,
    body[data-orientation="landscape"] .submit-button {
        padding: 6px !important;
        font-size: 0.85rem !important;
        min-height: 32px !important;
    }
}

/* Zusätzliche Anpassung für sehr kleine Landscape-Bildschirme */
@media (orientation: landscape) and (max-height: 500px) {
    .login-form-container {
        max-width: 45% !important;
        max-height: 99vh !important;
    }
    
    .modal-logo-img {
        width: 40px !important;
        height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
    }
    
    .login-subtitle {
        font-size: 9px !important;
    }
    
    .modal-logo {
        padding: 1px 0 0 0 !important;
    }
    
    .tab-button {
        padding: 4px !important;
        font-size: 0.75rem !important;
    }
    
    .tab-content {
        padding: 5px 8px !important;
        max-height: calc(99vh - 80px) !important;
    }
    
    .form-group {
        margin-bottom: 5px !important;
    }
    
    .form-group input {
        padding: 4px 6px !important;
        font-size: 0.7rem !important;
        min-height: 28px !important;
    }
    
    .submit-button {
        padding: 5px !important;
        font-size: 0.8rem !important;
        min-height: 28px !important;
    }
    
    .form-group label {
        font-size: 0.65rem !important;
        margin-bottom: 1px !important;
    }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high), (prefers-contrast: more) {
    .login-container {
        background: #000;
    }
    
    .login-form-container {
        border: 2px solid #000;
    }
    
    .form-group input {
        border-color: #000;
    }
    
    .submit-button {
        background: #000;
        border: 2px solid #fff;
    }
}

/* PIN ENTRY SPECIFIC STYLES */
.pin-entry-container {
    text-align: center;
    padding: 20px;
}

.pin-entry-container h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.pin-entry-container p {
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 1rem;
}

.pin-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.logout-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.logout-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.pin-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    color: #dc3545;
    font-size: 0.9rem;
    font-weight: 500;
}
