body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.content-wrapper.auth {
    background: linear-gradient(135deg, #e6e6fa 0%, #d8bfd8 50%, #dda0dd 100%);
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.content-wrapper.auth::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: 
    radial-gradient(circle at 20% 50%, rgba(230, 230, 250, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(221, 160, 221, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(216, 191, 216, 0.35) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-5%, -5%) rotate(120deg); }
    66% { transform: translate(5%, 5%) rotate(240deg); }
}

/* Floating particles */
.content-wrapper.auth::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
    radial-gradient(2px 2px at 60% 70%, white, transparent),
    radial-gradient(1px 1px at 50% 50%, white, transparent),
    radial-gradient(1px 1px at 80% 10%, white, transparent),
    radial-gradient(2px 2px at 90% 60%, white, transparent);
    background-size: 200% 200%;
    animation: particles 20s linear infinite;
    opacity: 0.4;
}

@keyframes particles {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* Modern Card with Glassmorphism */
.auth-form-light {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: slideInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.2s;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- UPDATED LOGO SECTION START --- */
.brand-logo {
    display: flex;
    justify-content: center; /* Ensures center alignment horizontally */
    align-items: center;     /* Ensures center alignment vertically */
    width: 100%;            /* Takes full width of the container */
    text-align: center;
    gap: 4px;
    margin-bottom: 2rem;
    margin-left: 0;         /* Removed the 100px margin */
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
    animation-delay: 0.5s;
}

/* Adjusted Responsive Rule */
@media (max-width: 991px) {
    .brand-logo {
        margin-left: 0; /* Ensures no margin is added on mobile */
    }
}

.brand-logo img {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    height: 31px;
    width: auto !important;
    max-width: 100%; /* Safety for very small screens */
}

.brand-logo img:hover {
    transform: scale(1.05);
}
/* --- UPDATED LOGO SECTION END --- */

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Heading Animations */
h4 {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInSlide 0.6s ease forwards;
    animation-delay: 0.7s;
}

h6 {
    color: #718096;
    font-weight: 400;
    opacity: 0;
    animation: fadeInSlide 0.6s ease forwards;
    animation-delay: 0.8s;
}

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

/* Form Animations */
.pt-3 {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
    animation-delay: 0.9s;
}

/* Modern Input Fields */
.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.form-control:focus {
    border-color: #b19cd9;
    box-shadow: 0 0 0 4px rgba(177, 156, 217, 0.2);
    background: white;
    transform: translateY(-2px);
}

.form-control:hover {
    border-color: #cbd5e0;
    background: white;
}

/* Form Group Animation */
.form-group {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.form-group:nth-child(2) {
    animation-delay: 1s;
}

.form-group:nth-child(3) {
    animation-delay: 1.1s;
}

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

/* Modern Button - Lavender Theme */
.btn-primary {
    background: linear-gradient(135deg, #b19cd9 0%, #9370db 100%);
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(177, 156, 217, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(177, 156, 217, 0.5);
    background: linear-gradient(135deg, #9370db 0%, #b19cd9 100%);
}

.btn-primary:active {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #8968cd 0%, #7b68a6 100%);
}

.mt-3 {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: 1.2s;
}

/* Alert Styles */
.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
    margin-bottom: 1.5rem;
    position: relative;
    animation: slideInDown 0.5s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.alert-danger::after {
    content: '⚠';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
}

.alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #16a34a;
    border-left: 4px solid #16a34a;
}

.alert-success::after {
    content: '✓';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
}

.alert .close {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.alert .close:hover {
    opacity: 1;
}

/* Password Toggle */
.password-toggle-login {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #a0aec0;
    font-size: 18px;
    z-index: 10;
    transition: all 0.3s ease;
}

.password-toggle-login:hover {
    color: #b19cd9;
    transform: translateY(-50%) scale(1.1);
}

.position-relative {
    position: relative;
}

/* Responsive adjustments */
/* FORCE FULL SCREEN ON MOBILE */
@media (max-width: 768px) {
    /* 1. Remove padding from the outer wrapper */
    .content-wrapper {
        padding: 0 !important;
    }

    /* 2. Make the grid column take 100% width with no spacing */
    .row.flex-grow .col-lg-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* 3. Stretch the card to full height and remove rounded corners */
    .auth-form-light {
        min-height: 100vh !important; /* Covers full height */
        border-radius: 0 !important;  /* Removes rounded corners */
        border: none !important;      /* Removes border */
        margin: 0 !important;         /* Removes margin */
        
        /* Optional: Centers the form content vertically */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}