.ts-systems-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    /* max-height: 60vh;*/
    overflow-y: auto;
    /*   padding-right: 10px;*/
}

    /* Custom scrollbar styling */
    .ts-systems-container::-webkit-scrollbar {
        width: 8px;
    }

    .ts-systems-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .ts-systems-container::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 10px;
    }

        .ts-systems-container::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

/* Ensure the login card doesn't overflow */
.login-card {
    /*    max-height: 90vh; */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Make the tenant selection area flexible */
#tenantSelection {
    /*    flex: 1;
      display: flex;
      flex-direction: column; */
    overflow: hidden;
}

.selected-card {
    background-color: #007bff !important;
    color: white !important;
    border: 2px solid #0056b3 !important;
}

    .selected-card .ts-card-title,
    .selected-card .ts-card-btn {
        color: white !important;
    }

.portal-select-btn {
    transition: all 0.2s ease-in-out;
    background-color: #007bff !important;
    color: white !important;
    border: 1px solid #007bff !important;
}

    .portal-select-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        background-color: #0056b3 !important;
        border-color: #0056b3 !important;
    }


.ts-system-card {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-top: 4px solid #0d6efd !important;
}

    .ts-system-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
        border-top: 4px solid #e2a93b !important;
    }

.ts-card-body {
    text-align: center;
    padding: 0rem;
}

.ts-card-icon {
    font-size: 1.5rem;
    background-color: #007bff;
    margin-bottom: 15px;
    width: 60px;
    height: 60px;
}

.ts-card-title {
    font-size: 1.19rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.ts-portals-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ts-card-btn {
    background-color: #007bff;
    color: white;
    border: none;
    /*  padding: 10px 15px; */
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 12px
}

    .ts-card-btn i {
        margin-left: 5px;
    }

/* Keep all existing login styles EXACTLY AS THEY ARE */
body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

#eyeIcon {
    color: #6c757d !important;
    cursor: pointer;
    transition: color 0.3s ease;
}

    #eyeIcon:hover {
        color: #007bff !important;
    }

    #eyeIcon.disabled-eye {
        color: #adb5bd !important;
        cursor: not-allowed;
    }

        #eyeIcon.disabled-eye:hover {
            color: #adb5bd !important;
        }

.fas:not(#eyeIcon) {
    color: white;
}

.tenant-role-container {
    display: none;
    margin-top: 20px;
}

.user-input-div {
    position: relative;
}

    .user-input-div input {
        width: 100%;
    }

    .user-input-div i {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
    }

#passwordInput:disabled {
    background-color: #f8f9fa;
    opacity: 0.7;
    cursor: not-allowed;
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#passwordInput::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

.selected-tenant-container {
    display: none;
    margin-bottom: 20px;
}

.selected-tenant-info {
    background-color: #EDEDED;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.emailreadonly {
    background-color: #EDEDED;
}

.password-container {
    display: none;
}

.separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 5px 0;
}

    .separator::before,
    .separator::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid #dee2e6;
    }

    .separator:not(:empty)::before {
        margin-right: .25em;
    }

    .separator:not(:empty)::after {
        margin-left: .25em;
    }

.action-links {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.action-link {
    color: #007bff;
    cursor: pointer;
    text-decoration: none;
}

    .action-link:hover {
        text-decoration: underline;
    }

.tenant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*  margin-bottom: 15px; */
}

.back-to-tenants {
    color: #007bff;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
}

    .back-to-tenants i {
        margin-right: 5px;
    }

/* Error state styles */
.password-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.alert-shake {
    animation: shake 0.5s ease-in-out;
}

.error-highlight {
    border-color: #dc3545 !important;
    animation: pulse 2s infinite;
}

/* Smooth login button transition */
.login-btn {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

    .login-btn:hover {
        transform: scale(1.01);
    }

    .login-btn:active {
        transform: scale(0.98);
    }

.email-display-container {
    display: none;
    margin-bottom: 20px;
}

.email-display {
    background-color: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    font-weight: 500;
    color: #495057;
}

.email-display-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 5px;
}
