﻿/* Login-Modal Styles */

.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 22, 38, 0.55);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: loginFadeIn 0.25s ease;
}

@keyframes loginFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 22px;
    width: 100%;
    max-width: 420px;
    margin: auto;
    box-shadow: 0 30px 70px rgba(20, 28, 51, 0.35);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: loginSlideUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes loginSlideUp {
    from {
        transform: translateY(26px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ---------- Header ---------- */
.login-modal-header {
    position: relative;
    padding: 30px 28px 26px;
    background: linear-gradient(135deg, #0f0d0d 0%, #530707 55%, #a81010 100%);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    border-bottom: none;
}

.login-modal-header::after {
    content: "";
    position: absolute;
    top: -60%;
    right: -10%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.login-brand-badge {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    backdrop-filter: blur(4px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.login-header-text { position: relative; z-index: 1; }

.login-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2px;
}

.login-modal-header p {
    margin: 3px 0 0;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 500;
}

.login-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: background 0.2s, transform 0.2s;
}

.login-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ---------- Body ---------- */
.login-modal-body {
    padding: 26px 28px 30px;
}

.login-form-group {
    margin-bottom: 18px;
}

.login-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #3a3434;
    font-size: 13.5px;
}

/* Eingabefelder mit Icon */
.login-input-wrap {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9a9090;
    pointer-events: none;
    transition: color 0.2s;
}

.login-input-wrap input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    border: 1.5px solid #d9d3d3;
    border-radius: 12px;
    font-size: 15.5px;
    background: #faf9f9;
    color: #1a1a1a;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.login-input-wrap input::placeholder {
    color: #b3a9a9;
}

.login-input-wrap input:focus {
    outline: none;
    border-color: #c84040;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(200, 64, 64, 0.14);
}

.login-input-wrap input:focus + .login-input-icon,
.login-input-wrap:focus-within .login-input-icon {
    color: #c84040;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 13.5px;
    font-weight: 500;
}

.login-submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 15.5px;
    margin-top: 4px;
    border-radius: 12px;
}

.login-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---------- 2FA-Schritt ---------- */
.login-totp-illu {
    width: 60px;
    height: 60px;
    margin: 4px auto 14px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c84040;
    background: linear-gradient(135deg, #faf0f0 0%, #f2d8d8 100%);
    border: 1px solid #e8b4b4;
}

.login-totp-hint {
    margin: 0 auto 20px;
    max-width: 300px;
    text-align: center;
    color: #5c5656;
    font-size: 14px;
    line-height: 1.45;
}

.login-totp-input {
    width: 100%;
    padding: 16px 14px;
    border: 1.5px solid #d9d3d3;
    border-radius: 14px;
    background: #faf9f9;
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 12px;
    font-variant-numeric: tabular-nums;
    font-family: 'SF Mono', 'Roboto Mono', 'Courier New', monospace;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-totp-input::placeholder {
    color: #cfc5c5;
    letter-spacing: 8px;
    font-size: 22px;
}

.login-totp-input:focus {
    outline: none;
    border-color: #c84040;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(200, 64, 64, 0.14);
}

.login-totp-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.login-totp-actions .btn-secondary,
.login-totp-actions .btn-primary {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding: 13px;
    border-radius: 12px;
    font-size: 15.5px;
}

.login-totp-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
    .login-modal,
    .login-modal-content { animation: none !important; }
    .login-modal-close:hover { transform: none; }
}
