/* --- New Diagonal Split Login Redesign --- */
.login-redesign-container {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 550px;
    /* Brand Gradient for stability - Darker Version */
    background: #f5f2ec;
    /* Cream Color */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    margin: 0 auto;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.login-redesign-left {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: transparent;
}

.login-redesign-right {
    flex: 1.4;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #e0f2fe;
    /* Light Blue */
    color: #1e3a8a;
    /* Dark Blue Text */
}

.login-redesign-logo {
    width: 320px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.2));
}

.login-redesign-left h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #1e3a8a;
    /* Dark Blue */
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.login-redesign-left h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1e3a8a;
    /* Dark Blue */
    margin: 0;
    font-family: 'Yeseva One', cursive;
    padding-bottom: 0.2rem;
}

/* Form Styles */
.login-redesign-right .auth-group {
    margin-bottom: 1.8rem;
}

.login-redesign-right label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e3a8a;
    /* Dark Blue */
    margin-bottom: 0.4rem;
    letter-spacing: 0.5px;
    text-align: center;
}

.login-redesign-right .input-wrapper {
    position: relative;
}

.login-redesign-right .input-wrapper input {
    width: 100%;
    background: #1e3a8a;
    /* Dark Blue BG */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.7rem 1.2rem;
    color: #ffffff;
    /* White Text */
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.login-redesign-right .input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.login-redesign-right .input-wrapper input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(186, 230, 253, 0.4);
    background: #1e3a8a;
    border-color: #bae6fd;
    color: #ffffff;
}

/* Fix for Autofill */
.login-redesign-right .input-wrapper input:-webkit-autofill,
.login-redesign-right .input-wrapper input:-webkit-autofill:hover,
.login-redesign-right .input-wrapper input:-webkit-autofill:focus,
.login-redesign-right .input-wrapper input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1e3a8a inset !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.login-redesign-right .show-password {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 800;
    color: #ffffff;
    /* White text to match input */
    cursor: pointer;
    letter-spacing: 1px;
}

.login-redesign-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 2.5rem;
}

.login-redesign-options label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0;
    cursor: pointer;
    color: #1e3a8a;
}

.login-redesign-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #bae6fd;
}

.login-redesign-options a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.login-redesign-options a:hover {
    color: #1e40af;
}

.login-redesign-btn {
    width: auto;
    min-width: 180px;
    margin: 0 auto;
    display: block;
    background: #1e3a8a !important;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.3);
}

.login-redesign-btn:hover {
    transform: translateY(-2px);
    background: #1e40af !important;
    box-shadow: 0 15px 30px rgba(30, 58, 138, 0.4);
}

.login-redesign-footer {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #1e3a8a;
}

.login-redesign-footer a:hover {
    color: #1e3a8a;
}

.back-home-wrapper {
    margin-top: 1.5rem;
    text-align: center;
}

.back-home-link {
    color: #1e3a8a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    opacity: 0.7;
}

.back-home-link:hover {
    opacity: 1;
    color: #1e40af;
    transform: translateX(-3px);
}
/* --- Grid definitions for Signup --- */
.signup-grid-4 {
    grid-template-columns: 2fr 0.7fr 2fr 0.7fr;
}

.signup-grid-2 {
    grid-template-columns: 1fr 1fr;
}

/* Responsive Login Mobile Update */
@media (max-width: 768px) {
    .form-section {
        align-items: flex-start !important;
        overflow-y: auto !important;
        padding: 2rem 1rem !important;
    }
    .login-redesign-container {
        flex-direction: column;
        min-height: auto;
        margin: auto !important;
        width: 100%;
        max-width: 400px;
        border-radius: 12px;
    }
    .login-redesign-left {
        padding: 1.5rem;
    }
    .login-redesign-right {
        padding: 1.5rem !important;
        max-height: none !important; /* Let it scroll naturally on mobile */
    }
    .login-redesign-logo {
        width: 150px;
        margin-bottom: 0.5rem;
    }
    .login-redesign-left h1 {
        font-size: 1.8rem;
    }
    .login-redesign-left h2 {
        font-size: 0.8rem;
    }
    
    /* Make signup grids stack on mobile */
    .signup-grid-4, .signup-grid-2 {
        grid-template-columns: 1fr;
    }
    
    /* Camera modal tweaks for mobile */
    #camera-modal video {
        width: 100% !important;
        height: auto !important;
        max-height: 70vh;
    }
    #camera-modal > div:nth-child(4) { /* The container for video */
        width: 90vw !important;
        height: auto !important;
    }
    #camera-modal svg {
        width: 100% !important;
        height: auto !important;
        max-height: 70vh;
    }
}
