﻿/* ======================================================
   USER LOGIN PAGE - TWO COLUMN WHITE THEME
   Author: Shiv Mahobia
   Version: 3.3 (Responsive with Logo & Blue Header)
   ====================================================== */

/* Reset and Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Public Sans", sans-serif;
    background: #f8fafc;
    color: #333333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    line-height: 1.5;
}

/* Main Container */
.login-container {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
}

/* Two Column Layout */
.two-column-layout {
    display: flex;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    min-height: 580px;
    position: relative;
}

/* Single Title for Both Columns with Logo */
.main-title {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    background: #00487c;
    color: white;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}

.portal-logo {
    height: 50px;
    width: auto;
    flex-shrink: 0;
}

.title-text {
    flex: 0 1 auto;
    max-width: 600px;
}

    .title-text h1 {
        font-weight: 700;
        font-size: 1.5rem;
        margin: 0;
        color: white;
        line-height: 1.2;
    }

    .title-text p {
        margin: 0.25rem 0 0 0;
        opacity: 0.9;
        font-size: 0.9rem;
        color: #e2e8f0;
        line-height: 1.3;
    }

/* Responsive adjustments for centered title */
@media (max-width: 768px) {
    .main-title {
        padding: 0.875rem 1.25rem;
        gap: 0.75rem;
    }

    .portal-logo {
        height: 45px;
    }

    .title-text h1 {
        font-size: 1.3rem;
    }

    .title-text p {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .main-title {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .portal-logo {
        height: 40px;
    }

    .title-text h1 {
        font-size: 1.1rem;
    }

    .title-text p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .portal-logo {
        height: 35px;
        margin-bottom: 0.25rem;
    }

    .title-text h1 {
        font-size: 1rem;
    }

    .title-text p {
        font-size: 0.75rem;
    }
}

.portal-logo {
    height: 65px;
    width: auto;
    flex-shrink: 0;
}


.title-text h1 {
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
    color: white;
}

.title-text p {
    margin: 0.25rem 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
    color: #e2e8f0;
}

/* Left Column - Login Form */
.login-form-column {
    flex: 1;
    padding: 2.5rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 90px; /* Space for the main title */
}

/* Right Column - Info Section */
.info-column {
    flex: 1;
    background: #f8fafc;
    color: #333;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid #e2e8f0;
    margin-top: 90px; /* Space for the main title */
}

/* Header Section */
.header-section {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

    .header-section h4 {
        font-weight: 700;
        color: #2c3e50;
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .header-section p {
        color: #6c757d;
        font-size: 0.9rem;
    }

/* Form Elements - Reduced Gaps */
.form-group {
    margin-bottom: 0.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}

.form-control {
    width: 100%;
    height: 42px;
    line-height: 1.5; /* Ensures matras fit within height */
    padding: 0.6rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background-color: #fff;
    font-family: "Public Sans", sans-serif;
}

    .form-control:focus {
        border-color: #00487C;
        box-shadow: 0 0 0 2px rgba(65, 89, 208, 0.1);
        outline: none;
    }

/* Custom Dropdown */
select.form-control,
#ddlUserType {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 40px;
    cursor: pointer;
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: center;
}

.input-group-merge .form-control {
    border-right: none;
    border-radius: 8px 0 0 8px;
}

.input-group-merge .input-group-text {
    background-color: #f8f9fa;
    border: 1.5px solid #e2e8f0;
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 0.6rem 0.9rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .input-group-merge .input-group-text:hover {
        background-color: #e9ecef;
        color: #4159d0;
    }


.captcha-label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.captcha-container {
    display: flex;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.captcha-image {
    height: 45px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
/*    flex: 1;*/
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
}

.refresh-captcha {
    cursor: pointer;
    color: #00487C;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1.5px solid #e2e8f0;
    flex-shrink: 0;
}

    .refresh-captcha:hover {
        transform: rotate(90deg);
        background: #00487C;
        color: white;
        border-color: #4159d0;
    }

.captcha-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-input {
    flex: 1;
    margin-bottom: 0.5rem;
}

    .captcha-input .form-control {
        margin-bottom: 0;
    }

/* Button Styles */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.25rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
    font-family: "Public Sans", sans-serif;
    text-decoration: none;
    line-height: 1.2;
    width:160px;
    min-width: 100px;
}

.btn-primary {
    background: #00487C;
    color: white;
    box-shadow: 0 2px 4px rgba(65, 89, 208, 0.2);
}

    .btn-primary:hover {
        background: #02375d;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(65, 89, 208, 0.3);
    }

.btn-danger {
    background: #e74c3c;
    color: white;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

    .btn-danger:hover {
        background: #c0392b;
        transform: translateY(-1px);
    }

.btn-warning {
    background: #f39c12;
    color: white;
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.2);
}

    .btn-warning:hover {
        background: #d68910;
        transform: translateY(-1px);
    }

.btn-info {
    background: #2379b3;
    color: white;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

    .btn-info:hover {
        background: #2980b9;
        transform: translateY(-1px);
    }

.btn-outline-secondary {
    background: transparent;
    border: 1.5px solid #6c757d;
    color: #6c757d;
}

    .btn-outline-secondary:hover {
        background: #6c757d;
        color: white;
        transform: translateY(-1px);
    }

/* Button Group */
.button-group {
    display: flex;
    justify-content: space-between; /* pushes first button to start, second to end */
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0.5rem;
    gap: 0.5rem; /* optional spacing between elements when wrapping */
}

    


/* Panels */
.panel {
    border-radius: 8px;
    padding: 0.25rem;
}

/* Security Notice - Moved to Right Column */
.security-notice {
    background: #fff9e6;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #b54700;
    line-height: 1.5;
    text-align: center;
}

    .security-notice strong {
        color: #b54700;
        font-size: 0.9rem;
        display: block;
        margin-bottom: 0.5rem;
    }

/* Validation Styles */
.required-field-validator {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 4px;
    font-size: 0.85rem;
}

/* Info Column Content */
.info-content {
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.info-features {
    list-style: none;
    margin: 1.5rem 0;
    flex-grow: 1;
}

    .info-features li {
        display: flex;
        align-items: center;
        margin-bottom: 1rem;
        padding: 0.75rem;
        background: #ffffff;
        border-radius: 8px;
        border: 1px solid #e2e8f0;
    }

.feature-icon {
    background: #4159d0;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.feature-text h5 {
    margin: 0 0 0.2rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
}

.feature-text p {
    margin: 0;
    font-size: 0.8rem;
    color: #6c757d;
}

.info-footer {
    margin-top: auto;
    font-size: 0.8rem;
    color: #6c757d;
}

/* ASP.NET Specific Styles */
#LoginwithOTP,
#Panel_ForgotPWD,
#OTPVisible {
    transition: all 0.2s ease;
}

.asp-panel {
    transition: all 0.2s ease-in-out;
}

/* ======================================================
   RESPONSIVE DESIGN
   ====================================================== */

/* Tablet and Small Desktop */
@media (max-width: 1024px) {
    .login-container {
        max-width: 900px;
    }

    .main-title {
        padding: 0.875rem 1.25rem;
    }

    .portal-logo {
        height: 45px;
    }

    .title-text h1 {
        font-size: 1.4rem;
    }

    .title-text p {
        font-size: 0.85rem;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .two-column-layout {
        flex-direction: column;
        min-height: auto;
    }

    .main-title {
        position: relative;
        margin-bottom: 0;
        padding: 1rem;
    }

    .portal-logo {
        height: 55px;
    }

    .title-text h1 {
        font-size: 1.3rem;
    }

    .title-text p {
        font-size: 0.8rem;
    }

    .login-form-column,
    .info-column {
        padding: 2rem;
        margin-top: 0;
    }

    .info-column {
        display: none;
        border-left: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .button-group {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }


    .refresh-captcha {
        align-self: center;
    }
}

/* Mobile Devices - Hide Right Column */
@media (max-width: 576px) {
    .info-column {
        display: none;
    }

    .login-form-column {
        width: 100%;
        padding: 1.5rem;
    }

    .main-title {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 0.75rem 1rem;
    }

    .portal-logo {
        height: 55px;
    }

    .title-text h1 {
        font-size: 1.1rem;
    }

    .title-text p {
        font-size: 0.75rem;
        margin-top: 0.125rem;
    }

    .form-control {
        height: 44px !important;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    select.form-control {
        padding: 0.45rem 0.75rem;
        line-height: normal;
    }



    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 375px) {
    body {
        padding: 10px;
    }

    .login-container {
        width: 100%;
    }

    .two-column-layout {
        border-radius: 8px;
    }

    .login-form-column {
        padding: 1.25rem;
    }

    .main-title {
        padding: 0.625rem 0.875rem;
    }

    .portal-logo {
        height: 30px;
    }

    .title-text h1 {
        font-size: 1rem;
    }

    .title-text p {
        font-size: 0.7rem;
    }

    .form-control {
        padding: 0.75rem 0.875rem;
    }
}

/* Focus Indicators for Accessibility */
.btn:focus,
.form-control:focus,
.refresh-captcha:focus {
    /*    outline: 2px solid #4159d0;
        outline-offset: 1px;*/
}

/* Loading State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

    .btn:disabled:hover {
        transform: none !important;
    }

/* Animation for panels */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.asp-panel {
    animation: slideDown 0.2s ease-out;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 2px;
    }

    .btn {
        border: 2px solid transparent;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .btn:hover,
    .refresh-captcha:hover {
        transform: none;
    }
}

.label-row {
    display: flex;
    justify-content: end;
    align-items:center;
}



.link-button {
    background: none;
    border: none;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    font-family: inherit;
    margin-top:6px;
}

    .link-button:hover {
        color: #0056b3;
        text-decoration: none;
    }



