:root {
    --primary-red: #9E1B32;
    --primary-red-hover: #b51218;
    --bg-gray: #f4f4f4;
    --text-gray: #666;
    --border-light: #eee;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-gray);
    /* Use dvh (dynamic viewport height) for better mobile browser support */
    height: 100dvh; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* Prevent the browser from showing scrollbars */
    overflow: hidden; 
}

.container {
    display: flex;
    width: 100%;
    max-width: 1500px;
    /* Use a percentage of the viewport so it shrinks on smaller screens */
    height: 100%;
    max-height: 850px; 
    background: var(--white);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* Ensure the sections inside the container don't force a scroll */
.form-section {
    flex: 1;
    padding: clamp(20px, 4vw, 60px);
    overflow-y: auto; /* If the form is too long, only the form section scrolls, not the page */
    display: flex;
    flex-direction: column;
}

/* Right Section (Image) */
.image-section {
    flex: 1.8;
    background: url('/Login.png') center/cover no-repeat;
    position: relative;
    display: block;
    transition: flex 0.3s ease; 
}

.brand img {
    height: 40px;
    margin-bottom: 40px;
}

.form-container {
    max-width: 400px;
    margin: auto;
    width: 100%;
}

h1 { 
    font-size: 2rem; 
    margin-bottom: 8px; 
    text-align: center; 
    color: var(--primary-red); 
}

.subtitle { 
    color: var(--text-gray); 
    text-align: center; 
    margin-bottom: 30px; 
    font-size: 0.95rem; 
}

.input-group { 
    margin-bottom: 20px; 
    position: relative; 
}

.input-group label { 
    display: block; 
    margin-bottom: 8px; 
    color: #555; 
    font-size: 0.85rem; 
    font-weight: 600; 
}

input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 25px;
    border: 1.5px solid var(--border-light);
    background: #fdfdfd;
    font-size: 1rem;
    transition: border 0.3s ease;
}

input:focus {
    outline: 2px solid var(--primary-red);
}

.password-wrapper { 
    position: relative; 
}

.eye-icon {
    font-weight: normal !important;
    font-style: normal;		
    position: absolute; 
    right: 18px; 
    top: 50%; 
    transform: translateY(-50%); 
    cursor: pointer; 
    opacity: 0.6;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    border-radius: 30px;
    border: none;
    background: var(--primary-red);
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    color: var(--white);
    transition: background 0.3s ease;
}

.submit-btn:hover { 
    background: var(--primary-red-hover); 
}

.submit-btn:disabled { 
    background: #ccc; 
    cursor: not-allowed; 
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    display: none;
    font-size: 0.9rem;
    text-align: center;
}

.error { 
    background: #ffebee; 
    color: #c62828; 
}

.success { 
    background: #e8f5e9; 
    color: #2e7d32; 
}

.footer-link-container {
    margin-top: 25px;
    font-size: 12px;
    color: var(--text-gray);
    line-height: 1.6;
    text-align: center;
}

.footer-link-container a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: bold;
}

/* Responsive Breakpoint */
@media (max-width: 900px) {
    .image-section { display: none; }
    .container { max-width: 500px; border-radius: 20px; }
}