/* --- AUTHENTICATION MODAL OVERRIDES --- */
#uni_modal .modal-dialog.modal-lg { 
    max-width: 900px !important; 
    margin: 1.75rem auto; /* Center Vertically */
}
#uni_modal .modal-content { 
    border: none; 
    border-radius: 16px; 
    overflow: hidden; 
}
#uni_modal .modal-body { 
    padding: 0 !important; 
    background: #fff;
}
#uni_modal .modal-footer { display: none; } 

/* --- MAIN CONTAINER --- */
.auth-container {
    background: #fff;
    overflow: hidden;
    width: 100%;
    height: 550px; /* Fixed height to prevent jitter */
    display: flex;
    position: relative;
}

/* --- LEFT SIDE (VISUAL) --- */
.auth-visual {
    background: linear-gradient(135deg, #B30000 0%, #5c0000 100%);
    width: 40%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
    z-index: 2;
}
.auth-visual::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48ZyBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9IkQwIDQwTCA0MCAwSDIwTDAgMjBNNDAgNDBWMjBMMjAgNDB4IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMDUiLz48L2c+PC9zdmc+');
    opacity: 0.3;
}
.quote-box {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 8px;
    margin-top: 30px;
    border-left: 4px solid #ffc107;
}

/* --- RIGHT SIDE (CONTENT AREA) --- */
.auth-content-area {
    width: 60%;
    position: relative;
    overflow: hidden;
}

/* --- SLIDES ANIMATION --- */
.auth-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    padding: 30px 50px; /* Reduced padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
    overflow-y: auto; /* Internal scroll only if absolutely needed */
    /* Hide scrollbar for cleaner look */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
.auth-slide::-webkit-scrollbar { display: none; }

.slide-active { transform: translateX(0); opacity: 1; z-index: 2; }
.slide-next { transform: translateX(100%); opacity: 0; z-index: 1; }
.slide-prev { transform: translateX(-100%); opacity: 0; z-index: 1; }

/* --- FORM ELEMENTS --- */
.nav-pills { justify-content: center; margin-bottom: 15px; border: none; }
.nav-pills .nav-link {
    color: #666; font-weight: 600; border-radius: 50px;
    padding: 6px 20px; background: #f8f9fa; margin: 0 5px; font-size: 0.9rem;
}
.nav-pills .nav-link.active {
    background-color: #B30000; color: white; box-shadow: 0 4px 10px rgba(179, 0, 0, 0.2);
}

.form-floating { margin-bottom: 8px; } /* Compact spacing */
.form-floating > .form-control { height: 45px; min-height: 45px; border-radius: 8px; font-size: 0.95rem; }
.form-floating > label { padding: 10px 15px; font-size: 0.9rem; }
.form-floating > .form-control:focus { border-color: #B30000; box-shadow: 0 0 0 0.2rem rgba(179, 0, 0, 0.1); }

.btn-auth {
    background-color: #B30000; color: white; height: 45px;
    border-radius: 8px; font-weight: 700; width: 100%; border: none;
    margin-top: 10px; transition: 0.3s;
}
.btn-auth:hover { background-color: #8a0000; color: white; transform: translateY(-2px); }

.btn-google {
    background: #fff; border: 1px solid #ddd; color: #555; font-weight: 600; font-size: 0.9rem;
    width: 100%; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: 0.2s; margin-bottom: 10px; text-decoration: none;
}
.btn-google:hover { background: #f8f9fa; border-color: #ccc; color: #333; }

/* --- OTP --- */
.otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 20px 0; }
.otp-box {
    width: 45px; height: 55px; text-align: center; font-size: 1.5rem; font-weight: 700;
    border: 2px solid #eee; border-radius: 8px; color: #B30000;
}
.otp-box:focus { border-color: #B30000; outline: none; background: #fff5f5; }

.closebtn {
    /* Essential resets for button element */
    background: transparent;
    border: none;
    padding: 0;
    
    /* Your existing styles */
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 50px; /* Ensure size matches your previous look */
    color: white;
    cursor: pointer;
    z-index: 1000000;
    line-height: 1;
    transition: 0.3s;
}

.closebtn:hover {
    color: #ffc107;
    transform: rotate(90deg);
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .auth-container { flex-direction: column; height: auto; min-height: auto; }
    .auth-visual { width: 100%; height: 120px; padding: 20px; flex-shrink: 0; }
    .auth-content-area { width: 100%; height: auto; min-height: 500px; }
    .quote-box { display: none; }
    .auth-slide { padding: 20px; position: relative; height: auto; }
    
    /* Disable slide animation on mobile, just toggle visibility */
    .slide-next, .slide-prev { display: none; }
    .slide-active { display: flex; transform: none; }
}