body,
html {
    height: 100%;
    margin: 0;
    background-color: #f0f2f5;
    font-family: "Montserrat", sans-serif;
}

.master-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 20px;
    background: #f4f6f9;
}

/* Split-screen container */
.split-login-container {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 480px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* LEFT PANEL (Dark Blue with Patterns) */
.left-panel {
    flex: 0 0 50%;
    background-color: #1e293b;
    background:
        linear-gradient(rgba(2, 6, 10, 0.75), rgb(31 31 31 / 75%)),
        url("/images/loginbackground2.webp");
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    padding: 40px;
    position: relative;
}

.left-panel::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.05) 0%,
        transparent 70%
    );
    z-index: -1;
    filter: blur(50px);
}

/* Left Panel Content */
.content-wrapper {
    max-width: 500px;
    text-align: left;
}

.welcome-headline {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    white-space: nowrap;
}

.welcome-text {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 400px;
}

.right-panel {
    flex: 0 0 50%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    border: none;
    background: transparent;
}

.sign-in-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2.5rem;
    font-size: 2.2rem;
}

/* Form Controls - to match the rounded input style in the image */
.login-card .input-group {
    background-color: #fbfbfb;
    border: 1px solid #e1e1e1;
    border-radius: 50px;
    overflow: hidden;
}

.login-card .input-group-text {
    background-color: transparent;
    border: none;
    color: #a0a0a0;
    padding-left: 1.5rem;
}

.login-card .form-control {
    background-color: transparent;
    border: none;
    font-size: 1rem;
    padding: 0.8rem 1rem;
    color: #333;
}

.login-card .form-control:focus {
    box-shadow: none;
    background-color: transparent;
}

/* 2. Target the wrapper (input-group) to change the border/line color on focus */
.login-card .input-group:focus-within {
    border-color: #27a5ee !important;
    box-shadow: 0 0 0 2px rgba(17, 63, 103, 0.1);
}

/* 3. Ensure the icons change color too when you type */
.login-card .input-group:focus-within .input-group-text {
    color: #1e293b;
}

/* Form Options */
.options-row {
    color: #777;
    font-size: 0.9rem;
}

.form-check-label {
    margin-left: 0.5rem;
}

.form-check-input:checked {
    background-color: #1e293b;
    border-color: #1e293b;
}

.forgot-link,
.create-link {
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover,
.create-link:hover {
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    background-color: #1e293b;
    border: none;
    padding: 0.8rem;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.btn-login:hover {
    background-color: #1e293b;
    color: #ffffff;
}
.new-here-text {
    font-size: 0.9rem;
    color: #777;
}

/* Decorative Calculator Icon */
.calculator-icon-bottom {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-size: 3rem;
    color: rgba(17, 63, 103, 0.2);
}

.btn-primary-custom {
    background-color: #1a252f;
    border: none;
    padding: 12px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-primary-custom:hover {
    background-color: #6b747c;
}

.login-title {
    font-optical-sizing: auto;
    font-style: normal;
    color: #43484c;
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.input-group-text {
    background-color: #00bbf0;
    color: white;
    border: none;
    border-radius: 4px 0 0 4px;
    width: 45px;
    justify-content: center;
}

.form-control {
    border: 1px solid #e0e0e0;
    border-left: none;
    border-radius: 0 4px 4px 0;
    padding: 3% !important;
}

/* Targeting the input focus specifically in this group */
.input-group .form-control:focus {
    border-color: #27a5ee !important;
    box-shadow: none;
    outline: none;
}

#loginButton:disabled {
    background-color: #1a252f !important;
    color: #ffffff !important;
    opacity: 0.8;
    cursor: not-allowed;
}

#loginButton:focus,
#loginButton:active,
#loginButton:focus-visible {
    background-color: #1a252f !important;
    color: #ffffff !important;
    border-color: #1a252f !important;
    box-shadow: 0 0 0 0.2rem rgba(26, 37, 47, 0.25) !important;
}

.password-toggle {
    cursor: pointer;
    color: #a0a0a0;
    padding-right: 1.5rem;
}

.password-toggle:hover {
    color: #1e293b;
}

#company_id {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: none !important;
    padding-right: 10px !important;
}

#username {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: none !important;
    padding-right: 10px !important;
}

#company_id option {
    background-color: #ffffff;
    color: #333;
    padding: 10px;
    font-size: 15px;
}

.login-card select.form-control {
    appearance: auto;
    cursor: pointer;
    background-image: none !important;
}

.login-card select.form-control:focus {
    box-shadow: none;
    background-color: transparent;
}
/* ===========================================
   Responsive Design
=========================================== */

/* Large Desktop */
@media (min-width: 1400px) {
    .split-login-container {
        max-width: 950px;
        min-height: 480px;
    }

    .welcome-headline {
        font-size: 3.5rem;
    }

    .login-card {
        max-width: 400px;
    }
}

/* Laptop */
@media (max-width: 1200px) {
    .split-login-container {
        max-width: 900px;
    }

    .left-panel,
    .right-panel {
        padding: 40px;
    }

    .welcome-headline {
        font-size: 3rem;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .master-wrapper {
        padding: 15px;
    }

    .split-login-container {
        flex-direction: column;
        width: 100%;
        max-width: 500px;
        min-height: auto;
        height: auto;
        border-radius: 15px;
    }

    .left-panel {
        height: 200px;
        flex: none;
        padding: 25px;
        text-align: center;
    }

    .content-wrapper {
        text-align: center;
    }

    .welcome-headline {
        font-size: 2rem;
        margin-bottom: 15px;
        white-space: nowrap;
    }

    .welcome-text {
        font-size: 15px;
        max-width: 100%;
    }

    .right-panel {
        padding: 30px 25px;
    }

    .login-card {
        padding: 0;
        max-width: 100%;
    }

    .sign-in-title {
        text-align: center;
        margin-bottom: 30px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .master-wrapper {
        padding: 15px;
    }

    .split-login-container {
        width: 100%;
        max-width: 360px;
    }

    .left-panel {
        height: 170px;
        padding: 20px;
    }

    .welcome-headline {
        font-size: 1.6rem;
        white-space: nowrap;
    }

    .welcome-text {
        font-size: 14px;
        line-height: 1.5;
    }

    .right-panel {
        padding: 25px 18px;
    }

    .sign-in-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .login-card .form-control {
        padding: 0.75rem 0.8rem;
        font-size: 15px;
    }

    .login-card .input-group-text {
        padding-left: 1rem;
        padding-right: 0.75rem;
    }

    #loginButton {
        height: 48px;
        font-size: 16px;
    }
}

/* Small Mobile */
@media (max-width: 375px) {
    .left-panel {
        height: 170px;
    }

    .welcome-headline {
        font-size: 1.5rem;
    }

    .welcome-text {
        font-size: 13px;
    }

    .sign-in-title {
        font-size: 1.6rem;
    }

    .login-card .form-control {
        font-size: 14px;
    }

    #loginButton {
        font-size: 15px;
    }
}

/*=============================
      CUSTOM USER DROPDOWN
==============================*/

.custom-user-group {
    overflow: visible !important;
    position: relative;
}

.custom-dropdown {
    position: relative;
    width: 100%;
    flex: 1;
}

.dropdown-btn {
    width: 100%;
    height: 100%;
    min-height: 44px;
    border: none;
    outline: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.selected-user {
    display: flex;
    text-align: left;
    flex: 1;
    min-width: 0;
}

.avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    margin-right: 12px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e293b;
    color: white;
    font-size: 13px;
    font-weight: 600;
}

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

#selectedText {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
    font-size: 15px;
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu-custom {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    display: none;
    z-index: 9999;
    max-height: 180px;
    overflow-y: auto;
}

.custom-dropdown.open .dropdown-menu-custom {
    display: block;
}

.dropdown-loading {
    padding: 15px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: 0.2s;
}

.user-item:hover {
    background: #f7f7f7;
}

.user-name {
    font-weight: 600;
    color: #1e293b;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1e293b;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 600;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selected-user .avatar.d-none {
    display: none !important;
}

#selectedText,
#selectedCompanyText,
.user-name {
    font-size: 0.875rem;
}