/* ========== Global Reset ========== */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ========== Body ========== */
body{
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%); /* Match other pages */
    overflow: hidden;
    padding: 20px;
}

/* ================= LAYOUT ================= */
.glass-container{
    position: relative;
    width: 380px; 
    padding: 40px;
    border-radius: 16px; 
    background: #ffffff; /* Solid white background */
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 32px rgba(26, 54, 93, 0.15);
    z-index: 10; 
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.glass-container:hover {
    box-shadow: 0 12px 40px rgba(26, 54, 93, 0.2);
}

/* Remove glass animation */
.glass-container::before{
    display: none;
}

.glass-container h2{
    color: #1a365d; /* Match header navy blue */
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.5px;
    margin-bottom: 40px;
}

.error-message {
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px; /* Keep existing */
    border: 1px solid rgba(229, 62, 62, 0.2);
}

/* Add this new rule */
.error-message + form .input-group:first-child {
    margin-top: 25px; /* Extra space for the first input after error */
}

.input-group{
    position: relative;
    margin-bottom: 30px;
}

.input-group input{
    width: 100%;
    padding: 15px 20px;
    background: #f7fafc; /* Light gray background */
    border: 2px solid #e2e8f0;
    outline: none;
    border-radius: 8px;
    font-size: 16px;
    color: #2d3748; /* Professional dark gray */
    transition: all 0.3s ease;
}

.input-group input::placeholder{
    color: #718096; /* Medium gray */
}

.input-group input:focus{
    background: #ffffff;
    border-color: #2c5282; /* Blue focus */
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.input-group label{
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    color: #718096; /* Medium gray */
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
}

.input-group input:focus + label,
.input-group input:valid + label {
    top: -12px;
    left: 15px;
    font-size: 12px;
    background: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    color: #2c5282; /* Blue label when active */
    font-weight: 500;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #718096; /* Medium gray */
    user-select: none;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #2c5282; /* Blue on hover */
}

.remember-forgot{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
    color: #4a5568; /* Professional gray */
}

.remember-forgot label{
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.remember-forgot input{
    margin-right: 8px;
    accent-color: #2c5282; /* Blue checkbox */
    width: 16px;
    height: 16px;
}

.remember-forgot a{
    color: #2c5282; /* Blue links */
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.remember-forgot a:hover{
    color: #1a365d; /* Darker blue on hover */
    text-decoration: underline;
}

.login-btn{
    width: 100%;
    padding: 15px;
    background: #e53e3e; /* Match CTA red */
    border: 2px solid #c53030;
    outline: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.login-btn:hover{
    background: #c53030;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 48, 48, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.register-link{
    text-align: center;
    margin-top: 25px;
    color: #4a5568; /* Professional gray */
    font-size: 14px;
}

.register-link a{
    color: #2c5282; /* Blue links */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.register-link a:hover{
    color: #1a365d; /* Darker blue on hover */
    text-decoration: underline;
}

/* ===== Additional Professional Elements ===== */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-subtitle {
    color: #718096;
    font-size: 14px;
    margin-top: 8px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #718096;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.divider::before {
    margin-right: 16px;
}

.divider::after {
    margin-left: 16px;
}

/* Social login buttons */
.social-login {
    margin-bottom: 20px;
}

.social-btn {
    width: 100%;
    padding: 12px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #2d3748;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

/* Error message styling */
.error-message {
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(229, 62, 62, 0.2);
}

/* Success message styling */
.success-message {
    background: rgba(72, 187, 120, 0.1);
    color: #38a169;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(72, 187, 120, 0.2);
}

/* ===== Loading State ===== */
.login-btn:disabled {
    background: #cbd5e0;
    border-color: #a0aec0;
    cursor: not-allowed;
    transform: none;
}

.login-btn:disabled:hover {
    background: #cbd5e0;
    box-shadow: none;
    transform: none;
}

/* ===== Responsive Design ===== */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .glass-container {
        width: 100%;
        max-width: 350px;
        padding: 30px 20px;
    }
    
    .glass-container h2 {
        font-size: 22px;
        margin-bottom: 30px;
    }
    
    .input-group {
        margin-bottom: 25px;
    }
    
    .input-group input {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .login-btn {
        padding: 13px;
        font-size: 15px;
    }
    
    .remember-forgot {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .register-link {
        font-size: 13px;
        margin-top: 20px;
    }
}

@media (max-width: 320px) {
    .glass-container {
        padding: 25px 15px;
    }
    
    .glass-container h2 {
        font-size: 20px;
    }
    
    .input-group input {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* ===== Two-column login layout ===== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1000px;
    margin: 60px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(26, 54, 93, 0.15);
    overflow: hidden;
}

/* Left illustration */
.login-image {
    flex: 1;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.login-image img {
    max-width: 90%;
    height: auto;
}

/* Right login form */
.login-wrapper .glass-container {
    flex: 1;
    box-shadow: none; /* remove double shadow */
    border: none;     /* remove double border */
    margin: 0;
    border-radius: 0;
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }
    .login-image {
        display: none; /* Hide image on mobile for simplicity */
    }
}

.simple-footer {
    background: #1a365d;
    padding: 15px;
    text-align: center;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.simple-footer p {
    margin: 0;
    color: #cbd5e0;
    font-size: 13px;
}