/* Allow scrolling on small/overflow containers */
html.before-login-html,
body.before-login-body {
  height: auto !important;
  overflow: auto !important;
}

.login-title {
  font-size: 30px;
  padding-bottom: 20px;
}

.login-bgsection {
  position: relative;
  height: 100vh;
  width: 100%;
}

.login-backgroundimg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.login-bgsection .container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background-color: var(--commonwhite-color);
  border-radius: 30px;
  height: 85vh;
  width: 100%;
  overflow: hidden;
  box-shadow: -19px 66px 68px 0px rgba(0, 0, 0, 0.09);
}

.login-card .col-lg-6:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-background);
}

.login-card .col-lg-6:last-child {
  height: 100%;
  overflow-y: auto;
  padding: 2rem;
  place-content: center;
}

.login-logo {
  margin-bottom: 45px;
}

.forgot-link {
  font-variant: var(--primary-color);
  font-weight: 600;
}

.border-hrline {
  border-top: 1px solid rgba(224, 224, 224, 1);
  opacity: 1;
}

/* ==========================================================================
   New Premium Design Styles
   ========================================================================== */

body.before-login-body {
    background-color: #0b4582 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    margin: 0;
    font-family: 'Inter', sans-serif;
}
.login-bgsection {
    display: none; /* Hide their original background */
}

.custom-login-wrapper {
    background: #ffffff;
    width: 1250px;
    max-width: 100%;
    min-height: 550px;
    margin: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    overflow: hidden;
    z-index: 10;
    position: relative;
}

/* Left Side */
.custom-login-left {
    flex: 1;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0efff 100%);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.custom-logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}
.custom-logo-container img {
    max-height: 40px;
    width: auto;
}

.custom-illustration {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}
.custom-illustration img {
    max-width: 90%;
    max-height: 280px;
    object-fit: contain;
    mix-blend-mode: multiply;
    animation: floatIllustration 5s ease-in-out infinite;
    will-change: transform;
}

.custom-left-content {
    margin-top: auto;
}
.custom-left-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1c2b36;
    margin-bottom: 10px;
}
.custom-left-content p {
    font-size: 14px;
    color: #5c6c79;
    line-height: 1.5;
    max-width: 320px;
    margin-bottom: 20px;
}
.custom-carousel-dots {
    display: flex;
    gap: 6px;
}
.custom-dot {
    width: 24px;
    height: 4px;
    background-color: #007aff;
    border-radius: 2px;
}
.custom-dot.inactive {
    width: 6px;
    background-color: #b5d5ff;
}

/* Right Side */
.custom-login-right {
    flex: 1;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.custom-login-right h1 {
    font-size: 30px;
    font-weight: 700;
    color: #1c2b36;
    margin-bottom: 8px;
}
.custom-login-right .subtitle {
    font-size: 14px;
    color: #5c6c79;
    margin-bottom: 25px;
}

.custom-form-group {
    margin-bottom: 15px;
}
.custom-form-group label.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1c2b36;
    margin-bottom: 8px;
}

.custom-input-wrapper {
    position: relative;
}
.custom-form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #d1d9e0;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    color: #1c2b36;
}
.custom-form-control:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}
.invalid-error {
    color: #e3342f;
    font-size: 12px;
    margin-top: 6px;
    display: block;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ba7b3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.password-toggle:hover {
    color: #5c6c79;
}
.forgot-link {
    display: inline-block;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: #007aff;
    text-decoration: none;
    margin-top: 10px;
    margin-bottom: 20px;
}
.forgot-link:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: #007aff;
    color: white;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}
.btn-login:hover {
    background-color: #0066d6;
}
.btn-login:active {
    transform: scale(0.98);
}
.btn-login.loading {
    opacity: 0.7;
    pointer-events: none;
}

.signup-link {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: #5c6c79;
}
.signup-link a {
    color: #007aff;
    font-weight: 600;
    text-decoration: none;
}
.signup-link a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Premium Entrance Keyframe Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes staggerFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply entrance animations with hardware-acceleration */
body.before-login-body .custom-login-wrapper {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    will-change: transform, opacity;
}

body.before-login-body .custom-login-left {
    animation: fadeInLeft 1s cubic-bezier(0.16, 1, 0.3, 1) both;
    will-change: transform, opacity;
}

body.before-login-body .custom-login-right {
    animation: fadeInRight 1s cubic-bezier(0.16, 1, 0.3, 1) both;
    will-change: transform, opacity;
}

/* Staggered element loads */
body.before-login-body .custom-login-right h1 {
    animation: staggerFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.2s;
    will-change: transform, opacity;
}

body.before-login-body .custom-login-right .subtitle {
    animation: staggerFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.3s;
    will-change: transform, opacity;
}

body.before-login-body .custom-form-group:nth-of-type(1) {
    animation: staggerFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.4s;
    will-change: transform, opacity;
}

body.before-login-body .custom-form-group:nth-of-type(2) {
    animation: staggerFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.5s;
    will-change: transform, opacity;
}

body.before-login-body .forgot-link {
    animation: staggerFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.6s;
    will-change: transform, opacity;
}

body.before-login-body .btn-login {
    animation: staggerFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.7s;
    will-change: transform, opacity;
}

body.before-login-body .btn-login.loading {
animation: none;
}
/* Continuous floating effect */
@keyframes floatIllustration {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Animated Tech Background shapes */
.bg-animated-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.bg-animated-shapes .tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 45px 45px;
    opacity: 0.8;
    animation: scrollGrid 20s linear infinite;
}

.bg-animated-shapes .shape {
    position: absolute;
    filter: blur(50px);
    transform-origin: center;
    will-change: transform, opacity;
}

/* Position and animate Shape 1 (Blue Blob) */
.bg-animated-shapes .shape-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    animation: floatShape1 25s ease-in-out infinite alternate;
}

/* Position and animate Shape 2 (Green Blob) */
.bg-animated-shapes .shape-2 {
    bottom: -15%;
    right: -10%;
    width: 45vw;
    height: 45vw;
    max-width: 550px;
    max-height: 550px;
    animation: floatShape2 20s ease-in-out infinite alternate-reverse;
}

/* Position and animate Shape 3 (Orange Orb) */
.bg-animated-shapes .shape-3 {
    top: 15%;
    right: 5%;
    width: 30vw;
    height: 30vw;
    max-width: 350px;
    max-height: 350px;
    animation: floatShape3 15s ease-in-out infinite;
}

/* Keyframes for Background Animations */
@keyframes floatShape1 {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(80px, 50px) rotate(180deg) scale(1.15);
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

@keyframes floatShape2 {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(-60px, -40px) rotate(-120deg) scale(0.9);
    }
    100% {
        transform: translate(0, 0) rotate(-360deg) scale(1);
    }
}

@keyframes floatShape3 {
    0% {
        transform: translateY(0px) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-30px) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateY(0px) scale(1);
        opacity: 0.7;
    }
}

/* Seamless background grid scrolling keyframes */
@keyframes scrollGrid {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 45px 45px;
    }
}
