/* --- General Body and Layout Styles --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #007bff, #6f42c1);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
}

.container {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    max-width: 1000px;
    width: 90%;
    overflow: hidden;
    min-height: 550px;
}

/* --- Sidebar Styles --- */
.sidebar {
    background: linear-gradient(to bottom, #0056b3, #007bff);
    color: #fff;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex: 0.8;
    position: relative;
}

.sidebar::after {
    content: '';
    position: absolute;
    right: -50px;
    top: 0;
    bottom: 0;
    width: 100px;
    background: #fff;
    border-top-left-radius: 100%;
    border-bottom-left-radius: 100%;
    z-index: 1;
    transform: translateX(50%);
}

.sidebar .logo {
    font-size: 3em;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 15px;
    line-height: 1;
}

.sidebar h1 {
    margin-bottom: 10px;
    font-size: 2.2em;
}

.sidebar p {
    font-size: 1.1em;
    line-height: 1.5;
    margin-bottom: 30px;
}

.sidebar .btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.sidebar .btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* --- Form Section Styles --- */
.form-section {
    flex: 2;
    padding: 40px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #007bff;
    font-size: 2em;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}

/* --- Flexbox Styles for Password Input --- */
.password-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding-right: 15px;
    transition: border-color 0.3s ease;
}

.password-input-group:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}

.password-input-group input {
    flex-grow: 1;
    border: none;
    outline: none;
    background: transparent;
}

.password-toggle {
    cursor: pointer;
    color: #888;
}

/* --- Specific Styles for Forgot Password Flow --- */
.instruction-text {
    text-align: center;
    margin-bottom: 20px;
    color: #555;
}

#user-email-display {
    color: #007bff;
}

.timer-resend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -15px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

#timer {
    color: #dc3545;
    font-weight: bold;
}

#resend-otp-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

#resend-otp-btn:disabled {
    color: #6c757d;
    cursor: not-allowed;
    text-decoration: none;
}

.login-btn-main {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    background-color: #007bff;
    color: #fff;
    margin-top: 20px;
}

.login-btn-main:hover {
    background-color: #0056b3;
}

/* --- Popup Message --- */
.popup-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.popup-message.error {
    background-color: #dc3545;
}

/* --- Responsive Adjustments for Tablets and Mobile --- */
@media (max-width: 900px) {
    .container {
        /* Stack the sidebar and form vertically */
        flex-direction: column;
        width: 100%;
        min-height: 100vh;
        max-width: none;
        border-radius: 0;
    }
    .sidebar {
        flex: auto;
        padding: 30px 20px;
    }
    .sidebar::after {
        /* Hide the decorative curve on small screens */
        display: none;
    }
    .form-section {
        flex: auto;
        padding: 30px 20px;
    }
}
.popup-message.show {
    opacity: 1;
}