* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #850724; 
    background: linear-gradient(135deg, #850724, #f7f0f0);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* ප්‍රධාන ෆෝම් පෙට්ටිය (Main Container) */
.login-container {
    background-color: #fff;
    display: flex;
    width: 100%;
    max-width: 950px;
    /* විශේෂ කොන් කැපීමේ හැඩය */
    border-radius: 0px 70px 0px 70px; 
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* වම්පස අඳුරු කොටස */
.left-banner {
    background-color: #8c6b6b; 
    color: #fff;
    width: 32%;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 32px;
    font-weight: bold;
    font-style: italic;
    margin-bottom: 20px;
}

.left-banner h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.left-banner p {
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
}

.register-section {
    margin-top: 40px;
}

.btn-register {
    display: inline-block;
    background-color: #6e0c0c;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    margin-top: 8px;
    transition: 0.3s;
}

.help-section {
    margin-top: auto;
    font-size: 11px;
    border-top: 1px solid #666;
    padding-top: 15px;
}

/* දකුණුපස සුදු කොටස */
.right-form {
    width: 68%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label, .mobile-login label {
    font-size: 12px;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

/* සියලුම සාමාන්‍ය Input Fields රවුම් හැඩය පවත්වා ගැනීම */
input[type="text"], input[type="email"], input[type="password"], .mobile-input, .otp-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 25px; 
    outline: none;
    font-size: 14px;
    height: 42px;
    transition: 0.3s;
}

/* [නිවැරදි කිරීම] ක්ලික් කළ විට ඔබේ තේමාවේ රතු/මරූන් පැහැය ගැන්වීම */
input:focus {
    border-color: #850724;
}

/* Email or Username කොටුව */
#login_username {
    width: 100%;
    padding: 10px 15px !important;
    border: 1px solid #ccc !important;
    border-radius: 25px !important; 
    outline: none !important;
    font-size: 14px !important;
    height: 42px !important;
}
/* [නිවැරදි කිරීම] */
#login_username:focus {
    border-color: #850724 !important;
}

.action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

/* [නිවැරදි කිරීම] කොළ පැහැ වර්ණ ඉවත් කර තේමාවට ගැලපීම */
.signup-notice {
    font-size: 11px;
    color: #850724;
}
.signup-notice a { color: #6e0c0c; font-weight: bold; text-decoration: none;}

.login-btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.forgot-pass {
    font-size: 11px;
    color: #6e0c0c;
    text-decoration: none;
}

.btn-login {
    background-color: #6e0c0c;
    color: white;
    border: none;
    padding: 10px 45px;
    border-radius: 0px 20px 0px 20px; 
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

/* මැද බෙදුම් රේඛාව */
.or-separator {
    text-align: left;
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin: 25px 0 15px 0;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* මොබයිල් ලොගින් කොටස */
.mobile-row, .otp-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.country-code {
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    padding: 10px 15px;
    border-radius: 25px 0 0 25px;
    font-size: 13px;
    color: #666;
}

.mobile-input {
    flex: 1;
    border-radius: 0 25px 25px 0;
}

.btn-verify, .btn-submit {
    background-color: #666;
    color: white;
    border: none;
    padding: 11px 25px;
    border-radius: 0px 20px 0px 20px;
    font-weight: bold;
    cursor: pointer;
    font-size: 13px;
}

.otp-row {
    margin-top: 10px;
    width: 100%;
}
.otp-row .form-group { flex: 0.6; }
.btn-submit { margin-top: 20px; padding: 11px 45px; }

/* Disabled වී ඇති විට ඇතිවන පෙනුම */
input:disabled, button:disabled {
    background-color: #e9ecef !important; 
    color: #6c757d !important;
    cursor: not-allowed !important; 
    opacity: 0.6;
    border-color: #ced4da !important;
}

/* CAPTCHA කොටස් සඳහා විලාසිතාවන් */
.captcha-img-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    padding: 5px 15px;
    border-radius: 25px; 
    height: 42px; 
    justify-content: space-between;
    width: 180px; 
}

.captcha-img-box img {
    height: 32px;
    width: auto;
    border-radius: 5px;
}

.btn-refresh-captcha {
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}
.btn-refresh-captcha:hover {
    transform: rotate(360deg);
}

.deptlogo-img-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    padding: 2px 12px;
    border-radius: 25px; 
    height: 40px; 
    justify-content: space-between;
    width: 120px; 
}

.deptlogo-img-box img {
    height: 35px;
    width: auto;
    border-radius: 5px;
}

/* ==========================================================================
   📱 RESPONSIVE DESIGN (දුරකථන සහ කුඩා උපකරණ සඳහා)
   ========================================================================== */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        border-radius: 0px 40px 0px 40px; 
    }
    
    .left-banner {
        width: 100% !important;
        padding: 30px 20px;
    }
    
    .help-section {
        margin-top: 25px; 
    }

    .right-form {
        width: 100% !important;
        padding: 30px 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .mobile-row, .otp-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .country-code {
        border-radius: 25px !important;
        text-align: center;
    }
    
    .mobile-input {
        border-radius: 25px !important;
    }
    
    .btn-verify, .btn-submit, .btn-login {
        width: 100%; 
        text-align: center;
        padding: 12px;
    }
    
    .action-row {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .login-btn-wrapper {
        width: 100%;
        align-items: stretch;
    }
    
    .forgot-pass {
        text-align: right;
        margin-bottom: 5px;
    }
    
    .captcha-img-box {
        width: 100%; 
    }
    .deptlogo-img-box {
        width: 50%; 
    }
}