/* ============================================= */
/* LOGIN PAGE — Enhanced UI                      */
/* Font: Inter | Animations | Focus FX | Buttons */
/* ============================================= */

/* ---- Global font ---- */
.custom-login-form-container,
.custom-login-form-container * {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ============================================= */
/* GRID LAYOUT FIX                               */
/* ============================================= */
.grid {
    display: grid !important;
    grid-template-columns: 65fr 35fr !important;
}

.grid > .background-slider {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

.grid > .custom-login-form-container {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

.grid > link,
.grid > script,
.grid > style {
    display: none !important;
}

/* ============================================= */
/* RIGHT SIDE - Login form panel                 */
/* ============================================= */

/* Override Lepton theme card/box styling */
.custom-login-form-container,
.custom-login-form-container .login-form-inner,
.custom-login-form-container .login-modal-form {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.custom-login-form-container {
    background-color: #F5F5F5 !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 2.5rem;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    justify-content: flex-start;
}

/* Safe vertical centering: spacers absorb equal space when room exists,
   collapse to 0 when content overflows — no top-clipping bug */
.custom-login-form-container::before,
.custom-login-form-container::after {
    content: '';
    flex: 1 1 0;
    min-height: 0;
}

.login-heading {
    width: 100%;
    margin-bottom: 0.75rem;
    text-align: left;
}

.login-modal-form {
    width: 100%;
}

.login-form-inner {
    width: 100%;
}

/* ============================================= */
/* Heading                                       */
/* ============================================= */
#welcomeTitle {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #1B1464 0%, #256EB5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
    margin-top: 0;
    line-height: 1.35;
    text-transform: capitalize;
    letter-spacing: -0.3px;
}

.loginsecondheading {
    color: #5a7d9a !important;
    font-size: 0.95rem;
    margin-bottom: 0;
    font-weight: 500;
    letter-spacing: 0.2px;
    font-style: italic;
}

.login-separator {
    border: none;
    border-top: 1.5px solid transparent;
    border-image: linear-gradient(to right, #256EB5, #d0d5dd, transparent) 1;
    margin: 1.25rem 0 1rem;
}

.logintagline {
    margin-top: 0 !important;
    font-weight: 500;
    color: #444 !important;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* ============================================= */
/* Page-load animations (staggered)              */
/* ============================================= */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-heading {
    animation: fadeSlideUp 0.45s ease-out both;
}

.login-modal-form {
    animation: fadeSlideUp 0.45s ease-out 0.1s both;
}

.custom-login-form-container .form-group:nth-child(1) {
    animation: fadeSlideUp 0.4s ease-out 0.15s both;
}

.custom-login-form-container .form-group:nth-child(2) {
    animation: fadeSlideUp 0.4s ease-out 0.22s both;
}

.custom-login-form-container .form-group:nth-child(3) {
    animation: fadeSlideUp 0.4s ease-out 0.29s both;
}

.forgot-password-row {
    animation: fadeSlideUp 0.4s ease-out 0.3s both;
}

.custom-login-form-container .btn.btn-primary,
.custom-login-form-container #loginButton {
    animation: fadeSlideUp 0.4s ease-out 0.35s both;
}

.RegisterDiv {
    animation: fadeSlideUp 0.4s ease-out 0.4s both;
}

/* ============================================= */
/* Override Lepton material-design inputs         */
/* ============================================= */
.custom-login-form-container .form-control,
.custom-login-form-container .form-control:not(:focus),
.custom-login-form-container input.form-control {
    background-color: #fff !important;
    background-image: none !important;
    border: 1.5px solid #d0d5dd !important;
    border-radius: 8px !important;
    height: 2.85rem !important;
    font-size: 0.95rem;
    padding: 0.5rem 0.875rem !important;
    box-shadow: none !important;
    transition: all 0.25s ease;
    width: 100%;
    border-left: 3px solid #d0d5dd !important;
}

.custom-login-form-container .form-control:focus,
.custom-login-form-container input.form-control:focus {
    border-color: #256EB5 !important;
    border-left: 3px solid #256EB5 !important;
    box-shadow: 0 0 0 3px rgba(37, 110, 181, 0.1), inset 0 1px 3px rgba(37, 110, 181, 0.06) !important;
    background-image: none !important;
    background-color: #fafcff !important;
}

/* Remove Lepton ::after underline on form groups */
.custom-login-form-container .form-group::after,
.custom-login-form-container .form-group::before {
    display: none !important;
}

/* ============================================= */
/* Input with icon (username / password)         */
/* ============================================= */
.input-icon-wrapper {
    position: relative;
    width: 100%;
}

.input-icon-wrapper .form-control,
.input-icon-wrapper input.form-control {
    padding-right: 42px !important;
}

.input-icon-right {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #aab4c0;
    font-size: 17px;
    z-index: 10;
    line-height: 1;
    transition: color 0.25s ease;
}

.input-icon-wrapper:focus-within .input-icon-right {
    color: #256EB5;
}

/* ============================================= */
/* Form labels                                   */
/* ============================================= */
.custom-login-form-container .form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
    letter-spacing: 0.1px;
}

/* ============================================= */
/* Forgot password                               */
/* ============================================= */
.forgot-password-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}

.forgot-password-link,
.forgot-password-row a {
    font-size: 0.85rem;
    color: #256EB5 !important;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-password-link:hover,
.forgot-password-row a:hover {
    text-decoration: underline;
    color: #1a5a99 !important;
}

/* ============================================= */
/* reCAPTCHA                                     */
/* ============================================= */
.recaptcha-wrapper {
    display: flex;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* ============================================= */
/* Login button - Gradient + hover lift          */
/* ============================================= */
.custom-login-form-container .btn.btn-primary,
.custom-login-form-container #loginButton {
    color: #fff !important;
    background: linear-gradient(135deg, #256EB5 0%, #1B5E9E 50%, #164B80 100%) !important;
    border: none !important;
    height: 2.85rem !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.4px;
    width: 100%;
    display: block;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(37, 110, 181, 0.25);
    position: relative;
    overflow: hidden;
}

.custom-login-form-container .btn.btn-primary:hover,
.custom-login-form-container #loginButton:hover {
    background: linear-gradient(135deg, #1B5E9E 0%, #256EB5 50%, #2E7BC7 100%) !important;
    box-shadow: 0 6px 20px rgba(37, 110, 181, 0.35);
    transform: translateY(-2px);
}

.custom-login-form-container .btn.btn-primary:active,
.custom-login-form-container #loginButton:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(37, 110, 181, 0.2);
}

/* ============================================= */
/* Signup link                                   */
/* ============================================= */
.RegisterDiv {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.88rem;
    color: #666;
}

.RegisterDiv a {
    color: #256EB5;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.RegisterDiv a:hover {
    text-decoration: underline;
    color: #1a5a99;
}

/* ============================================= */
/* Validation / Alert                            */
/* ============================================= */
.loginAlertMsg {
    height: 0rem;
}

.custom-login-form-container .text-danger {
    font-size: 0.78rem;
    font-weight: 500;
}

.text-end {
    text-align: end !important;
}

/* ============================================= */
/* Responsive breakpoints                        */
/* ============================================= */

@media (max-width: 480px) {
    .grid { grid-template-columns: 1fr !important; }
    .background-slider { display: none !important; }
    .custom-login-form-container { padding: 1.5rem 1rem !important; }
    #welcomeTitle { font-size: 1.2rem !important; }
}

@media (min-width: 481px) and (max-width: 834px) {
    .grid { grid-template-columns: 1fr !important; }
    .background-slider { display: none !important; }
    .custom-login-form-container { padding: 3rem 2rem !important; }
    .info-container { display: flex !important; flex-direction: column !important; }
    .custom-info {
        color: #120879;
        font-size: 13px;
        font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        text-align: center;
        font-weight: 500;
        padding: 0 20px;
        display: block;
        margin: 5px 0 !important;
        line-height: 1.5;
    }
    .logintagline { margin-top: 0px !important; }
}

@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .background-slider .illustration img { max-height: 35vh; }
    .custom-welcome { font-size: 12px !important; }
    .welcome-container { padding: 0.5rem 1rem; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .custom-login-form-container { padding: 1.5rem !important; }
}

@media (min-width: 1024px) and (max-width: 1366px) {
    .custom-login-form-container { padding: 1.5rem !important; }
    #welcomeTitle { font-size: 1.3rem !important; }
}

/* 14" laptop at 150% zoom: effective ~1280x720 */
@media (max-height: 750px) and (min-width: 1024px) {
    .custom-login-form-container {
        padding: 0.75rem 1.25rem !important;
    }
    .login-heading { margin-bottom: 0.25rem; }
    #welcomeTitle { font-size: 1.05rem !important; margin-bottom: 0.15rem; }
    .loginsecondheading { font-size: 0.8rem; }
    .login-separator { margin: 0.4rem 0 0.3rem; }
    .logintagline { font-size: 0.78rem; margin-bottom: 0.15rem; }
    .custom-login-form-container .form-group { margin-bottom: 0.4rem !important; }
    .custom-login-form-container .form-label { font-size: 0.8rem; margin-bottom: 0.15rem; }
    .custom-login-form-container .form-control,
    .custom-login-form-container .form-control:not(:focus),
    .custom-login-form-container input.form-control { height: 2.2rem !important; font-size: 0.85rem; padding: 0.3rem 0.75rem !important; }
    .custom-login-form-container .btn.btn-primary,
    .custom-login-form-container #loginButton { height: 2.2rem !important; font-size: 0.88rem !important; }
    .forgot-password-row { margin-top: 0.1rem; margin-bottom: 0.3rem; }
    .forgot-password-row a { font-size: 0.78rem; }
    .RegisterDiv { margin-top: 0.4rem; font-size: 0.78rem; }
    .recaptcha-wrapper { margin-top: 0.4rem; margin-bottom: 0.4rem; }
}

/* Extra compact: very small viewport heights */
@media (max-height: 600px) and (min-width: 1024px) {
    .custom-login-form-container {
        padding: 0.5rem 1rem !important;
    }
    .login-heading { margin-bottom: 0.15rem; }
    #welcomeTitle { font-size: 0.95rem !important; margin-bottom: 0.1rem; line-height: 1.25; }
    .loginsecondheading { font-size: 0.75rem; }
    .login-separator { margin: 0.3rem 0 0.2rem; }
    .logintagline { font-size: 0.75rem; margin-bottom: 0.1rem; }
    .custom-login-form-container .form-group { margin-bottom: 0.3rem !important; }
    .custom-login-form-container .form-label { font-size: 0.78rem; margin-bottom: 0.1rem; }
    .custom-login-form-container .form-control,
    .custom-login-form-container .form-control:not(:focus),
    .custom-login-form-container input.form-control { height: 2rem !important; font-size: 0.82rem; padding: 0.25rem 0.65rem !important; }
    .custom-login-form-container .btn.btn-primary,
    .custom-login-form-container #loginButton { height: 2rem !important; font-size: 0.85rem !important; }
    .forgot-password-row { margin-top: 0.05rem; margin-bottom: 0.2rem; }
    .forgot-password-row a { font-size: 0.75rem; }
    .RegisterDiv { margin-top: 0.3rem; font-size: 0.75rem; }
    .recaptcha-wrapper { margin-top: 0.3rem; margin-bottom: 0.3rem; }
}

@media (min-width: 1367px) and (max-width: 1599px) {
    .custom-login-form-container { padding: 1.7rem !important; }
    #welcomeTitle { font-size: 1.4rem !important; }
}

@media (min-width: 1600px) and (max-width: 1919px) {
    .custom-login-form-container { padding: 2rem !important; }
    #welcomeTitle { font-size: 1.5rem !important; }
    .welcome-container { padding: 0.8rem 1.5rem 1.5rem; }
    .custom-welcome { font-size: 14px; }
}
