@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #0f172a; /* Darker, more professional background */
    padding: 20px;
    color: #fff;
}

.auth-wrapper {
    position: relative;
    width: 100%;
    max-width: 850px;
    height: 500px;
    background: #1e293b;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
}

/* Background Shapes */
.background-shape {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    transform: skewX(-15deg);
    z-index: 1;
}

.secondary-shape {
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 30%;
    height: 40%;
    background: rgba(59, 130, 246, 0.1);
    filter: blur(40px);
    border-radius: 50%;
    z-index: 0;
}

.credentials-panel {
    position: relative;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 50px;
    z-index: 2;
    background: #111827;
}

.credentials-panel h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    letter-spacing: -1px;
}

.field-wrapper {
    position: relative;
    width: 100%;
    height: 60px;
    margin-bottom: 25px;
}

.field-wrapper input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    outline: none;
    font-size: 1rem;
    color: #fff;
    padding: 20px 35px 5px 0;
    transition: all 0.3s ease;
}

.field-wrapper label {
    position: absolute;
    top: 20px;
    left: 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Floating Label Animation */
.field-wrapper input:focus ~ label,
.field-wrapper input:not(:placeholder-shown) ~ label {
    top: 0;
    font-size: 0.85rem;
    color: #3b82f6;
    font-weight: 600;
}

.field-wrapper input:focus {
    border-bottom-color: #3b82f6;
}

.field-wrapper i {
    position: absolute;
    right: 5px;
    bottom: 12px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.password-toggle {
    position: absolute;
    right: 35px;
    bottom: 12px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.password-toggle:hover {
    color: #3b82f6;
}

.field-wrapper input:focus ~ i,
.field-wrapper input:not(:placeholder-shown) ~ i {
    color: #3b82f6;
}

.submit-button {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    margin-top: 10px;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

/* Remember Me Checkbox */
.remember-me-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-left: 2px;
}

.remember-me-wrapper input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.remember-me-wrapper input[type="checkbox"]:checked {
    background: #3b82f6;
    border-color: #3b82f6;
}

.remember-me-wrapper input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 7 Free';
    font-weight: 900;
    font-size: 10px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.remember-me-wrapper label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.remember-me-wrapper:hover label {
    color: rgba(255, 255, 255, 0.9);
}

/* Welcome Section */
.welcome-section {
    position: relative;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding: 0 60px;
    z-index: 2;
    text-align: right;
}

.welcome-section h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1;
}

.welcome-logo {
    max-width: 250px;
    height: auto;
    margin-top: 15px;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.welcome-logo:hover {
    transform: scale(1.05);
}

.welcome-section p {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Footer Styling */
.footer {
    margin-top: 40px;
    font-size: 0.9rem;
    opacity: 0.6;
    text-align: center;
}

/* Autofill styling */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 50px #111827 inset !important;
    -webkit-text-fill-color: white !important;
    caret-color: white !important;
}

/* Base animations */
.slide-element {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

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

.credentials-panel h2 { animation-delay: 0.1s; }
.field-wrapper:nth-of-type(1) { animation-delay: 0.2s; }
.field-wrapper:nth-of-type(2) { animation-delay: 0.3s; }
.field-wrapper:nth-of-type(3) { animation-delay: 0.4s; }
.welcome-section h2 { animation-delay: 0.5s; }
.welcome-section p { animation-delay: 0.6s; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
        height: auto;
        max-width: 450px;
    }
    .credentials-panel, .welcome-section {
        width: 100%;
        padding: 40px;
    }
    .welcome-section {
        display: none;
    }
    .background-shape {
        display: none;
    }
}