/* login-animation.css */

/* Core centering & coordinate grid background */
body.login {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #090e17;
    overflow: hidden;
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Stack form, card and copyright vertically to prevent overlap */
#frmLogin {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
}

#loginBox {
    width: 100%;
    margin-bottom: 25px; /* Symmetrical separation */
}

/* Glassmorphism login card */
#loginInnerBox {
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 35px 30px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
    text-align: center;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Logos Header alignment */
.logo-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

/* LABA Main Product Logo Pill Badge */
.laba-logo-pill {
    background: #ffffff;
    border-radius: 9999px; /* Pill shape */
    padding: 6px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
    width: 100%;
    max-width: 290px; /* Fitting nicely within the boundaries of the login box */
    height: 38px;
    overflow: hidden;
}

.laba-logo-pill img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Lonza badge capsule - centered flex alignment */
.lonza-logo-badge {
    background: #ffffff;
    border-radius: 6px;
    padding: 8px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    height: 36px;
    box-sizing: border-box;
}

.lonza-logo-badge img {
    max-height: 18px;
    width: auto;
    display: block;
}

/* Title / Error Title */
#loginInnerBox h3#h3Title {
    font-size: 13px;
    font-weight: 500;
    color: #ef4444 !important;
    margin-bottom: 20px;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    line-height: 1.4;
    transition: all 0.3s ease;
    text-align: left;
}

#loginInnerBox h3#h3Title:empty {
    display: none !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Form row elements */
.rowHolder {
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}

.rowHolder .loginLabel {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 6px;
}

.rowHolder .loginLabel.red {
    color: #ef4444 !important;
}

/* Input container wrapper */
.input-container {
    position: relative;
    width: 100%;
}

/* Icons inside inputs */
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #64748b;
    z-index: 5;
    pointer-events: none;
    transition: color 0.3s ease;
}

/* Inputs styling */
.usernameInputForm, 
.passInputForm {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px 12px 38px !important;
    font-size: 14px !important;
    color: #f8fafc !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    height: 44px !important;
}

.usernameInputForm:focus,
.passInputForm:focus {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15) !important;
}

/* Focus siblings styling */
.usernameInputForm:focus ~ .input-icon,
.passInputForm:focus ~ .input-icon {
    color: #38bdf8;
}

/* Input error fields */
.usernameInputForm.errorField,
.passInputForm.errorField {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.usernameInputForm.errorField ~ .input-icon,
.passInputForm.errorField ~ .input-icon {
    color: #ef4444 !important;
}

/* Button & Notice placement */
.buttonPosition {
    margin-top: 25px;
}

/* Premium Login Button */
#cmdLogin.button {
    width: 100%;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 46px !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25) !important;
}

#cmdLogin.button:hover:not(:disabled) {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35) !important;
}

#cmdLogin.button:active:not(:disabled) {
    transform: translateY(1px) !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2) !important;
}

#cmdLogin.button:disabled {
    background: #334155 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.8;
}

/* Legal stewardship notice */
.legal-stewardship-notice {
    font-family: inherit;
    font-size: 11px !important;
    color: #94a3b8 !important;
    background-color: rgba(15, 23, 42, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-left: 3px solid #0ea5e9 !important;
    text-align: left !important;
    margin-top: 20px !important;
    padding: 10px 12px !important;
    line-height: 1.5 !important;
    border-radius: 6px !important;
}

.legal-stewardship-notice a {
    color: #38bdf8 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

.legal-stewardship-notice a:hover {
    text-decoration: underline !important;
    color: #7dd3fc !important;
}

/* copyright badge - styled below the form */
.copyright-link {
    display: inline-block !important;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    z-index: 20;
    margin-top: 5px !important;
}

.copyright-link:hover {
    opacity: 0.9;
}

.copyright-link img {
    filter: invert(1) brightness(0.9);
    display: block;
    border-radius: 8px;
}

/* Responsive adjustment for small viewport heights to allow scrolling and prevent overlap */
@media (max-height: 640px) {
    body.login {
        height: auto !important;
        min-height: 100vh !important;
        overflow-y: auto !important;
        padding: 30px 0 !important;
        box-sizing: border-box !important;
    }
    
    #frmLogin {
        justify-content: flex-start !important;
    }
}

/* Theme setups for gradients (randomized on load for premium look) */
.bg-theme-1 { background: radial-gradient(circle at center, #0c1c29 0%, #050b11 100%) !important; }
.bg-theme-2 { background: radial-gradient(circle at center, #1b1129 0%, #0a0510 100%) !important; }
.bg-theme-3 { background: radial-gradient(circle at center, #0f172a 0%, #020617 100%) !important; }
.bg-theme-4 { background: radial-gradient(circle at center, #1e0b24 0%, #0d0210 100%) !important; }
.bg-theme-5 { background: radial-gradient(circle at center, #0a1b15 0%, #030806 100%) !important; }


