* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    min-height: 100vh; /* Changed height to min-height to prevent clipping on small screens */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px; /* Adds breathing room around the card on mobile devices */
}

.container {
    display: flex;
    width: 100%; /* Default fluid width for smaller devices */
    max-width: 900px; /* Replaces hardcoded 900px so it downscales gracefully */
    min-height: 550px; /* Swapped from static height to allow vertical breathing room */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Left Side Panel (Illustration) */
.left-panel {
    flex: 1;
    background-color: #e3fafc;
    display: flex;
    justify-content: center;
    align-items: center;
}

.left-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right Side Panel (Form Card) */
.right-panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    width: 100%; /* Ensures the right panel expands natively on small viewports */
}

.login-card {
    width: 100%;
    max-width: 340px;
    text-align: center;
}

.login-card h2 {
    font-size: 28px;
    color: #333333;
    margin-bottom: 5px;
}

.login-card p {
    font-size: 14px;
    color: #777777;
    margin-bottom: 25px;
}

/* Flash Messages Alert Box */
.error-messages {
    background-color: #ffeef0;
    border-left: 4px solid #ff4d4d;
    color: #d93838;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 13px;
}

/* Input Fields Layout */
.input-group {
    display: flex;
    align-items: center;
    background-color: #f1f3f5;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    background-color: #e9ecef;
    box-shadow: 0 0 0 2px #228be6;
}

.input-group .icon {
    font-size: 16px;
    color: #adb5bd;
    margin-right: 12px;
    display: flex;
    align-items: center;
}

.input-group input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 14px;
    color: #495057;
    outline: none;
    -webkit-appearance: none; /* Fixes unexpected input styling inconsistencies on iOS Safari */
}

/* 2FA Radio Box Selection Custom Styles */
.verification-choice {
    text-align: left;
    margin: 20px 0;
    padding: 5px;
}

.verification-choice .choice-title {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.verification-choice label {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: #666666;
    margin-right: 20px;
    cursor: pointer;
    padding: 6px 0; /* Makes click targets easier to hit on mobile screens */
}

.verification-choice input[type="radio"] {
    margin-right: 6px;
    accent-color: #228be6;
    width: 16px; /* Slightly larger targets for touchscreens */
    height: 16px;
}

/* Action Button Control */
button[type="submit"] {
    width: 100%;
    background-color: #228be6;
    color: #ffffff;
    border: none;
    padding: 13px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
}

button[type="submit"]:hover {
    background-color: #1c7ed6;
}

/* Auxiliary Links */
.forgot {
    display: inline-block;
    margin-top: 20px;
    font-size: 13px;
    color: #228be6;
    text-decoration: none;
}

.forgot:hover {
    text-decoration: underline;
}

/* ==========================================================================
   NEW: Responsive Media Query Layout Breakpoint
   ========================================================================== */
@media (max-width: 768px) {
    /* Hide the illustration panel so user doesn't have to scroll past an image */
    .left-panel {
        display: none;
    }

    /* Collapse container down to an independent card layout */
    .container {
        flex-direction: column;
        box-shadow: none; /* Optional: Cleaner flat aesthetic on mobile views */
        background: transparent;
        min-height: auto;
    }

    /* Adjust form card padding so it maximizes phone real estate */
    .right-panel {
        padding: 24px 12px;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    }
    
    /* Make OTP selections display stacked cleanly instead of squishing text */
    .verification-choice label {
        display: flex;
        margin-right: 0;
        margin-bottom: 8px;
    }
}