/* ---------- GLOBAL & BASE ---------- */
.login-section {
    position: relative;
    font-family: var(--font-family);
    background: #171c3e;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---------- LEFT PANEL: FULL WIDTH BACKGROUND (z-index 1) ---------- */
.login-section .visual-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/slides/slide3.png') no-repeat center center/cover;
    z-index: 1;
}
.login-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(23,28,62,0.85) 0%, rgba(23,28,62,0.6) 100%);
    z-index: 1;
}
.login-section .bottom-content {
    position: absolute;
    bottom: 256px;
    left: 256px;
    z-index: 2;
    color: #ffffff;
}
.login-section .logo-light {
    width: 256px;
    height: 256px;
    object-fit: contain;
    margin-bottom: 16px;
}
.login-section .bottom-content h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    max-width: 80%;
    display: none;
}

/* ---------- RIGHT PANEL: OVERLAY ON THE RIGHT (z-index 3) ---------- */
.login-section .form-panel {
    position: relative;
    z-index: 3;
    width: 50%;
    margin-left: auto;          /* push to the right side */
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    box-sizing: border-box;
}

/* Inner form container – opaque enough for readability */
.login-section .form-container {
    max-width: 400px;
    width: 100%;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 28px;
    padding: 44px 36px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ---------- TEXT & TYPOGRAPHY ---------- */
.login-section .form-container h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #171c3e;
    margin-bottom: 8px;
}
.login-section .subtext {
    color: #4a5568;
    margin-bottom: 32px;
    font-size: 0.9rem;
}

/* Alert error */
.login-section .alert-error {
    background: rgba(254, 226, 226, 0.85);
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-bottom: 24px;
    border-left: 4px solid #b91c1c;
    backdrop-filter: blur(4px);
}

/* ---------- FORM INPUTS ---------- */
.login-section .input-group {
    margin-bottom: 24px;
}
.login-section .input-group label {
    display: block;
    font-weight: 600;
    color: #171c3e;
    margin-bottom: 8px;
    font-size: 0.85rem;
}
.login-section .input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.login-section .input-group input:focus {
    outline: none;
    border-color: #cdae77;
    box-shadow: 0 0 0 3px rgba(205, 174, 119, 0.2);
}

/* Password toggle */
.login-section .password-wrapper {
    position: relative;
}
.login-section .password-wrapper input {
    padding-right: 48px;
}
.login-section .toggle-pwd {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6c7a89;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-section .toggle-pwd:hover {
    color: #cdae77;
}

/* Error messages */
.login-section .error-msg {
    display: block;
    font-size: 0.7rem;
    color: #dc2626;
    margin-top: 4px;
}
.login-section .input-group.error input {
    border-color: #dc2626;
}

/* ---------- FORM UTILITIES ---------- */
.login-section .form-utils {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0 32px;
}
.login-section .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #171c3e;
    cursor: pointer;
}
.login-section .checkbox-label input {
    display: none;
}
.login-section .checkmark {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    display: inline-block;
    position: relative;
}
.login-section .checkbox-label input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 3px;
    font-size: 14px;
    color: #cdae77;
}
.login-section .forgot-link {
    font-size: 0.85rem;
    color: var(--color-dark);
    text-decoration: none;
}
.login-section .forgot-link:hover {
    text-decoration: underline;
}

/* Divider "or" */
.login-section .divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0 20px;
}
.login-section .divider::before,
.login-section .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}
.login-section .divider span {
    font-size: 0.8rem;
    color: #6c7a89;
    padding: 0 12px;
}

/* Google Sign‑in Button */
.login-section .google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #171c3e;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 24px;
    cursor: pointer;
}
.login-section .google-btn svg {
    width: 20px;
    height: 20px;
}
.login-section .google-btn:hover {
    background: #f0f2f5;
    border-color: #cdae77;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ---------- LOGIN BUTTON ---------- */
.login-section .login-btn {
    background: #cdae77;
    color: #171c3e;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px;
    width: 100%;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}
.login-section .login-btn:hover {
    background: #b89a5e;
    transform: translateY(-2px);
}

/* ---------- FOOTER TEXT ---------- */
.login-section .footer-text {
    text-align: center;
    font-size: 0.85rem;
    color: #4a5568;
}
.login-section .signup-link {
    color: var(--color-dark);
    font-weight: 600;
    text-decoration: none;
}
.login-section .signup-link:hover {
    text-decoration: underline;
}

/* ---------- RESPONSIVE (mobile stacking with equal heights) ---------- */
@media (max-width: 900px) {
    .login-section {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    .login-section .visual-panel {
        position: relative;
        height: 40vh;
        min-height: 300px;
        flex-shrink: 0;
    }
    .login-section .bottom-content {
        bottom: 24px;
        left: 24px;
    }
    .login-section .bottom-content h1 {
        font-size: 1.5rem;
    }
    .login-section .form-panel {
        position: absolute;
        top: 0;
        width: 100%;
        height: 100%;
        margin-left: 0;
        min-height: auto;
        flex: 1;  /* takes remaining height */
        background: rgba(255, 255, 255, 0.2);
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding: 48px 24px;
        align-items: center;
    }
    .login-section .form-container h2 {
        text-align: center;
    }
    .login-section .subtext {
        text-align: center;
    }
}