
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-size: 16px;
}

#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-white);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-language-wrapper {
    position: absolute;
    top: 20px;
    right: 50px;
}

.splash {
    background: var(--color-bg-white);
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    max-width: 1200px;
    min-width: 320px;
    margin: auto;
    z-index: 99;
}

.backstage {
    width: 100%;
    opacity: 0;
    z-index: -10;
    transition: all 0.7s;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.splash__fade-in-logo {
    opacity: 1;
    height: 100vh;
    display: grid;
    justify-content: center;
    grid-template-rows: 28vh;
    z-index: 0;
}

.splash__fade-in-subline {
    opacity: 0;
    height: 100vh;
    display: grid;
    justify-content: center;
    align-content: center;
    grid-template-rows: 0 48vh;
    position: absolute;
    top: 0;
    margin: 0 auto;
    left: 0;
    right: 0;
}

.fade-in-subline {
    animation: fadeIn 1s ease-in forwards;
}

.fade-in--img-logo,
.fade-in--img-subline {
    width: 50vw;
    grid-area: 2;
}

@media (max-width: 650px) {
    .fade-in--img-logo,
    .fade-in--img-subline {
        width: 90vw;
    }
    .splash__fade-in-logo {
        grid-template-rows: 30vh;
    }
    .splash__fade-in-subline {
        grid-template-rows: 0 42vh;
    }
}

.login-container {
    border-radius: 12px;
    padding: 40px;
    width: 100vw;
    max-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    animation: loginFormIn 0.5s ease-out 2s both;
}

@keyframes loginFormIn {
    0%   { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.login-logo { text-align: center; margin-bottom: 10px; }
.login-logo img { width: 180px; height: auto; }

.login-product-version {
    text-align: center;
    margin: 0 0 18px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--color-text-pale);
}

.login-headline { text-align: center; margin-bottom: 30px; }
.login-headline-subtitle {
    font-size: 12px;
    color: var(--color-text-pale);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}
.login-headline-title {
    font-size: 24px;
    color: var(--color-text);
    font-weight: 600;
    margin: 0;
}

.login-form-field { margin-bottom: 20px; }

.login-form-label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.login-form-input:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px rgba(199, 127, 35, 0.1);
}

.login-error-message,
.login-db-error-message {
    display: none;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 20px;
}

.login-form-submit {
    width: 100%;
    padding: 14px;
    background: var(--color-brand);
    color: var(--color-bg-white);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.login-form-submit:hover  { background: var(--color-brand-dark); }
.login-form-submit:active { transform: scale(0.98); }

.login-registered {
    text-align: center;
    margin-top: 25px;
    font-size: 12px;
    color: var(--color-text-pale);
}

.login-registered-company {
    color: var(--color-brand);
    font-weight: 500;
}

.login-footer {
    position: absolute;
    bottom: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

#login-language-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.login-lang-flag {
    width: 24px;
    height: auto;
}

#loaderDiv-login {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.95);
    padding: 30px 50px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 10001;
    text-align: center;
}


.login-sso-divider { display:flex; align-items:center; gap:12px; margin:22px 0 16px; color:#999; font-size:12px; font-weight:600; }
.login-sso-divider::before, .login-sso-divider::after { content:""; flex:1; height:1px; background:var(--color-border); }
.login-sso-icons { display:flex; align-items:center; justify-content:center; gap:14px; margin-top:4px; }
.login-sso-icon-button { width:50px; height:50px; padding:0; background:#fff; color:#111; border:1px solid #d2d2d2; border-radius:50%; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; transition:background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.login-sso-icon-button:hover { background:#f8f8f8; border-color:#b8b8b8; box-shadow:0 2px 8px rgba(0,0,0,.10); transform:translateY(-1px); }
.login-sso-icon-button:focus-visible { outline:2px solid var(--color-primary, #e56a22); outline-offset:2px; }
.login-sso-brand-icon { width:24px; height:24px; display:block; }
.microsoft-brand-icon { width:22px; height:22px; }
.x-brand-icon { width:21px; height:21px; }
.login-sso-error { display:none; background:#fff5f5; border:1px solid #feb2b2; color:#c53030; padding:12px 15px; border-radius:6px; font-size:13px; margin-bottom:12px; }

/* SSO error returns must render like a normal login validation error: immediately. */
html.sso-error-return .splash { display: none !important; }
html.sso-error-return .login-container {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}
