/* Popup Overlay */
.login-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffffbd;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Popup Container */
.login-container {
    background: #ffffff00;
    backdrop-filter: blur(7px);
    border-radius: 16px;
    width: 100%;
    max-width: 824px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 0px 5px rgba(0, 0, 0, 0.15);
    position: relative;
    min-height: 500px;
    height: auto;
    /* align-items: stretch; */
    padding: 12px;
}

.login-left,
.login-right {
    width: 50%;
    max-width: 50%;
    min-width: 50%;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 5px;
    transition: opacity 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: #1C1B1F;
    background: #ffffff00;
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

.close-btn:hover {
    opacity: 0.7;
}

.close-btn svg {
    width: 24px;
    height: 24px;
    /* stroke: #333; */
    stroke: #fff;
    stroke-width: 2;
}

/* Left Side - Form */
.login-left {
    flex: 1;
    padding: 32px 50px;
    display: flex;
    flex-direction: column;
    /* background: white; */
}

/* Logo */
.logo-wrapper {
    /* margin-bottom: 35px; */
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 60px;
}

.logo {
    width: 38px;
    height: 38px;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Header */
.login-left h1 {
    color: #000;
    font-size: 28px;
    font-weight: 600;
    line-height: 44px;
    letter-spacing: 0px;
    margin-bottom: 32px;
}

.signup-link {
    color: #666;
    /* margin-bottom: 35px; */
    font-size: 12px;
    font-weight: normal;
    line-height: 16px;
    letter-spacing: 0px;

}

.signup-link a {
    color: #0075B8;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
}

.signup-link a:hover {
    text-decoration: none;
}

/* Form Elements */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group label {
    color: #0075B8;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0px;
    width: max-content;
    height: auto;
    gap: 10px;
    padding: 0px 4px;
    position: absolute;
    top: -8px;
    left: 15px;
    background: #ffffff;
    z-index: 1;
    border-radius: 3px;
}

.input-wrapper {
    position: relative;
}

.form-group input {
    width: 100%;
    height: 52px;
    padding: 12px 16px;
    border: 1.5px solid #0075B8;
    border-radius: 10px;
    font-size: 14px;
    /* transition: all 0.3s ease; */
    /* color: #333; */

}

.form-group input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group input.error {
    border-color: #dc3545;
}

.form-group input.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-text {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-text.show {
    display: block;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    color: #999;
}

.login-btn {
    width: 100%;
    background: #0066cc;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 50px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    /* margin-bottom: 32px; */
    margin-bottom: 20px;
    /* margin-top: 5px; */
}

.login-btn:hover:not(:disabled) {
    background: #0052a3;
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}



.forgot-password {
    text-align: left;
    /* margin-top: 15px; */
}

.forgot-password a {
    color: #0066cc;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.forgot-password a:hover {
    text-decoration: none;
}

.error-message {
    background: #fee;
    color: #c33;
    /* padding: 12px 16px; */
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 13px;
    display: none;
    border: 1px solid #fcc;
}

.error-message.show {
    display: block;
}

/* Right Side - Image */
.login-right {
    flex: 1;
    /* background: linear-gradient(135deg, #e8f0f7 0%, #f5f8fa 100%); */
    display: flex;
    align-items: center;
    justify-content: center;
    /* margin: 12px; */
    padding: 12px;
    position: relative;
    overflow: hidden;
}

.classroom-image {
    width: 100%;
    height: 100%;
    /* max-height: 500px; */
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 12px;
    overflow: hidden;
}

.community-badge {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #00000040;
    padding: 8px 16px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(30px);
    z-index: 2;
    width: max-content;
}

.community-badge span {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0px;
}

.community-badge span img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    object-position: center;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        min-height: auto !important;
        padding: 25px;
    }

    .login-right {
        display: none;
    }

    .login-left {
        padding: 0px;
    }

    .close-btn {
        top: 15px;
        right: 15px;
    }

    .login-left,
    .login-right {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
    }

    .login-left h1 {
        font-size: 18px;
    }

    .login-title {
        order: 1;
    }

    form#loginForm {
        order: 2;
    }

    .error-message {
        order: 3;
    }

    .forgot-password {
        order: 4;
    }

    .logo-wrapper {
        order: 5;
        justify-content: center;
        margin-top: 50px;
        margin-bottom: 0px;
    }

    .logo-wrapper .logo {
        display: none;
    }

    .close-btn svg {
        stroke: #333;
    }
}

/* ── New Multi-Screen Login Additions ── */

.login-screen {
    display: flex;
    flex-direction: column;
}

.login-subtitle {
    font-size: 13px;
    color: #555;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Bottom links row (Forgot Password / Login with Password) */
.login-bottom-links {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}

.login-bottom-links a {
    color: #0066cc;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.login-bottom-links a:hover {
    text-decoration: none;
}

/* Change number row */
.change-number-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
}

.change-number-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #0066cc;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.change-number-link:hover {
    text-decoration: none;
}

.phone-display {
    font-size: 13px;
    color: #444;
    padding-left: 2px;
}

/* OTP sent info box */
.otp-sent-info {
    background: #e8f4ff;
    color: #0066cc;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
}

/* OTP label */
.otp-label {
    font-size: 13px;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

/* OTP input boxes */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.otp-box {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    border: 1.5px solid #0075B8;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #111;
    background: transparent;
}

.otp-box:focus {
    border-color: #0052a3;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

/* Resend row */
.resend-row {
    text-align: center;
    margin-bottom: 8px;
}

.resend-link {
    color: #0066cc;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.resend-link:hover {
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .otp-box {
        width: 38px;
        height: 46px;
        font-size: 18px;
    }

    .otp-inputs {
        gap: 7px;
    }

    .login-bottom-links {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .login-screen {
        order: unset;
    }
}