/* ============================================= */
/* Forgot Password — 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; }

/* ---- Lepton card/box override ---- */
.custom-login-form-container,
.custom-login-form-container .login-modal-form {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* ---- Container ---- */
.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;
}

/* ---- Heading ---- */
.login-heading {
    width: 100%;
    margin-bottom: 0.75rem;
    text-align: left;
}

#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;
}

/* ---- Form container ---- */
.login-modal-form {
    width: 100%;
}

.info-text {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    color: #666;
    line-height: 1.5;
}

/* ---- Page-load animations ---- */
@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 {
    animation: fadeSlideUp 0.4s ease-out 0.18s both;
}

.custom-login-form-container .btn.btn-primary {
    animation: fadeSlideUp 0.4s ease-out 0.28s both;
}

.back-to-login {
    animation: fadeSlideUp 0.4s ease-out 0.35s both;
}

/* ---- Lepton underline override ---- */
.custom-login-form-container .form-group::after,
.custom-login-form-container .form-group::before {
    display: none !important;
}

/* ---- 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;
}

/* ---- Form controls with focus accent ---- */
.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;
}

/* ---- Input with icon ---- */
.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;
}

/* ---- Button - Gradient + hover lift ---- */
.custom-login-form-container .btn.btn-primary {
    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 {
    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 {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(37, 110, 181, 0.2);
}

/* ---- Back to login link ---- */
.back-to-login {
    text-align: center;
    margin-top: 1.25rem;
}

.back-to-login a {
    color: #256EB5;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease;
}

.back-to-login a:hover {
    text-decoration: underline;
    color: #1a5a99;
}

/* ---- Validation ---- */
.custom-login-form-container .text-danger {
    font-size: 0.78rem;
    font-weight: 500;
}

/* ---- Responsive ---- */
@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; }
}

@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; }
    .info-text { font-size: 0.82rem; margin-bottom: 0.75rem; line-height: 1.4; }
    .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 { height: 2.2rem !important; font-size: 0.88rem !important; }
    .back-to-login { margin-top: 0.5rem; }
    .back-to-login a { font-size: 0.82rem; }
}

/* 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; }
    .info-text { font-size: 0.78rem; margin-bottom: 0.5rem; line-height: 1.35; }
    .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 { height: 2rem !important; font-size: 0.85rem !important; }
    .back-to-login { margin-top: 0.4rem; }
    .back-to-login a { font-size: 0.78rem; }
}

@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; }
}
