/* ==================================================
   Font & Body
================================================== */
body {
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #eef1f4;
    overflow-x: hidden; /* Prevent scroll during slide-in */
}

/* ==================================================
   Main Auth Container
================================================== */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    perspective: 1000px; /* Adds depth for 3D transforms */
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background: #fff;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    
    /* Animation Entry */
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    animation: containerEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* ==================================================
   Branding Column (Left Side)
================================================== */
.auth-branding-column {
    flex-basis: 45%;
    background-color: #006A4E;
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='hexagons' fill='%23ffffff' fill-opacity='0.1' fill-rule='nonzero'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.99 7.5V30L0 22.5zM15 15l12.99 7.5V30L15 22.5z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    
    /* Subtle background scroll animation */
    animation: bgScroll 60s linear infinite;
    position: relative;
    overflow: hidden;
}

.branding-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    
    /* Animation */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.branding-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.6;
    
    /* Animation */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

/* ==================================================
   Form Column (Right Side)
================================================== */
.auth-form-column {
    flex-basis: 55%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 2.5rem;
    
    /* Animation */
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.auth-logo {
    width: 170px;
    height: 60px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05);
}

.auth-title {
    font-weight: 700;
    color: #333;
}

/* ==================================================
   Form Elements Styling & Animation
================================================== */
form .mb-3, 
form .mb-4, 
form .d-flex, 
form .d-grid {
    opacity: 0;
    transform: translateX(10px);
    animation: slideInRightShort 0.6s ease-out forwards;
}

/* Staggered Delays for Form Items */
form .mb-3:nth-of-type(1) { animation-delay: 0.7s; }
form .mb-3:nth-of-type(2) { animation-delay: 0.8s; }
form .mb-3:nth-of-type(3) { animation-delay: 0.9s; }
form .mb-4                { animation-delay: 0.9s; }
form .d-flex              { animation-delay: 1.0s; }
form .d-grid              { animation-delay: 1.1s; }

.form-control {
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #e5e5e5;
    background-color: #f9fafb;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.form-control:focus {
    border-color: #ffd66b;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(255, 214, 107, 0.15); /* Softer, richer shadow */
    transform: translateY(-2px); /* Slight lift on focus */
}

.input-group-text {
    cursor: pointer;
    background-color: #f9fafb;
    border: 1px solid #e5e5e5;
    border-left: none;
    transition: all 0.3s ease;
}
.form-control:focus + .input-group-text {
    border-color: #ffd66b;
    background-color: #fff;
}

.auth-link {
    color: black;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.auth-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #006A4E;
    transition: width 0.3s ease;
}

.auth-link:hover {
    color: #006A4E;
}

.auth-link:hover::after {
    width: 100%;
}

/* ==================================================
   Main Action Button
================================================== */
.auth-btn {
    background-color: #006A4E;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    box-shadow: 0 4px 6px rgba(0, 106, 78, 0.2);
}

.auth-btn:hover {
    background-color: #00563f;
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 106, 78, 0.3);
}

.auth-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* ==================================================
   Responsive Design
================================================== */
@media (max-width: 991.98px) {
    .auth-branding-column {
        display: none;
    }
    .auth-form-column {
        flex-basis: 100%;
    }
    .auth-container {
        flex-direction: column;
        min-height: auto;
        max-width: 500px;
    }
    .auth-form-column, .auth-card .card-body {
        padding: 2rem;
    }
}

/* ==================================================
   High Quality Keyframe Animations
================================================== */

/* 1. Main Container Entry */
@keyframes containerEntrance {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 2. Text Fade In Up */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 3. Form Elements Slide In */
@keyframes slideInRightShort {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 4. Background Panning Pattern */
@keyframes bgScroll {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}